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

Unified Diff: media/filters/gpu_video_decoder.h

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year. Created 8 years, 5 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
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index af6dcf8d6738f5e55f7fffb3170f276306b0a858..898537b7821f28494c0ce0a75b8ebba2c3c98b5b 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -67,7 +67,6 @@ class MEDIA_EXPORT GpuVideoDecoder
virtual void Read(const ReadCB& read_cb) OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
virtual void Stop(const base::Closure& closure) OVERRIDE;
- virtual const gfx::Size& natural_size() OVERRIDE;
virtual bool HasAlpha() const OVERRIDE;
virtual void PrepareForShutdownHack() OVERRIDE;
@@ -117,9 +116,10 @@ class MEDIA_EXPORT GpuVideoDecoder
// Indicate the picturebuffer can be reused by the decoder.
void ReusePictureBuffer(int64 picture_buffer_id);
- void RecordBufferTimeData(
+ void RecordBufferData(
const BitstreamBuffer& bitstream_buffer, const Buffer& buffer);
- base::TimeDelta GetBufferTimestamp(int32 id);
+ void GetBufferData(int32 id, base::TimeDelta* timetamp,
+ gfx::Size* natural_size);
// Set |vda_| and |weak_vda_| on the VDA thread (in practice the render
// thread).
@@ -142,10 +142,6 @@ class MEDIA_EXPORT GpuVideoDecoder
StatisticsCB statistics_cb_;
- // TODO(scherkus): I think this should be calculated by VideoRenderers based
- // on information provided by VideoDecoders (i.e., aspect ratio).
- gfx::Size natural_size_;
-
// Pointer to the demuxer stream that will feed us compressed buffers.
scoped_refptr<DemuxerStream> demuxer_stream_;
@@ -194,9 +190,15 @@ class MEDIA_EXPORT GpuVideoDecoder
// The texture target used for decoded pictures.
uint32 decoder_texture_target_;
- // Maintains bitstream buffer ID to timestamp mappings.
- typedef std::pair<int32, base::TimeDelta> BufferTimeData;
- std::list<BufferTimeData> input_buffer_time_data_;
+ struct BufferData {
+ BufferData(int32 bbid, base::TimeDelta ts,
+ const gfx::Size& natural_size);
+ ~BufferData();
+ int32 bitstream_buffer_id;
+ base::TimeDelta timestamp;
+ gfx::Size natural_size;
+ };
+ std::list<BufferData> input_buffer_data_;
// picture_buffer_id and the frame wrapping the corresponding Picture, for
// frames that have been decoded but haven't been requested by a Read() yet.
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698