Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 426873004: Pass decoded picture size from VDA to client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use gfx::Size Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 16a33eae54c6fc3cdff4f65b09e773af14392a01..bac46994b57bfb4aefd86c22c1d9f5cba980fead 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -53,9 +53,8 @@ GpuVideoDecoder::PendingDecoderBuffer::PendingDecoderBuffer(
GpuVideoDecoder::PendingDecoderBuffer::~PendingDecoderBuffer() {}
GpuVideoDecoder::BufferData::BufferData(
- int32 bbid, base::TimeDelta ts, const gfx::Rect& vr, const gfx::Size& ns)
- : bitstream_buffer_id(bbid), timestamp(ts), visible_rect(vr),
- natural_size(ns) {
+ int32 bbid, base::TimeDelta ts)
+ : bitstream_buffer_id(bbid), timestamp(ts) {
}
GpuVideoDecoder::BufferData::~BufferData() {}
@@ -276,9 +275,7 @@ void GpuVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
void GpuVideoDecoder::RecordBufferData(const BitstreamBuffer& bitstream_buffer,
const DecoderBuffer& buffer) {
input_buffer_data_.push_front(BufferData(bitstream_buffer.id(),
- buffer.timestamp(),
- config_.visible_rect(),
- config_.natural_size()));
+ buffer.timestamp()));
// Why this value? Because why not. avformat.h:MAX_REORDER_DELAY is 16, but
// that's too small for some pathological B-frame test videos. The cost of
// using too-high a value is low (192 bits per extra slot).
@@ -289,17 +286,13 @@ void GpuVideoDecoder::RecordBufferData(const BitstreamBuffer& bitstream_buffer,
input_buffer_data_.pop_back();
}
-void GpuVideoDecoder::GetBufferData(int32 id, base::TimeDelta* timestamp,
- gfx::Rect* visible_rect,
- gfx::Size* natural_size) {
+void GpuVideoDecoder::GetBufferData(int32 id, base::TimeDelta* timestamp) {
for (std::list<BufferData>::const_iterator it =
input_buffer_data_.begin(); it != input_buffer_data_.end();
++it) {
if (it->bitstream_buffer_id != id)
continue;
*timestamp = it->timestamp;
- *visible_rect = it->visible_rect;
- *natural_size = it->natural_size;
return;
}
NOTREACHED() << "Missing bitstreambuffer id: " << id;
@@ -424,10 +417,9 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) {
// Update frame's timestamp.
base::TimeDelta timestamp;
- gfx::Rect visible_rect;
- gfx::Size natural_size;
- GetBufferData(picture.bitstream_buffer_id(), &timestamp, &visible_rect,
- &natural_size);
+ gfx::Rect visible_rect(picture.size());
Pawel Osciak 2014/08/10 00:02:22 Please do not make any changes to this class. Unfo
kcwu 2014/08/12 04:48:06 Done.
+ gfx::Size natural_size(picture.size());
+ GetBufferData(picture.bitstream_buffer_id(), &timestamp);
DCHECK(decoder_texture_target_);
scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture(

Powered by Google App Engine
This is Rietveld 408576698