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

Unified Diff: media/filters/gpu_video_decoder.h

Issue 16274005: Separate DemuxerStream and VideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: VideoFrameStream ready for review. Created 7 years, 6 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.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index 00a10beee5a1db108f7eaa3645c8299b72f0a852..9d68c1e32b0e322aacdd5156e5198c236698f865 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -12,7 +12,6 @@
#include "base/memory/weak_ptr.h"
#include "media/base/pipeline_status.h"
-#include "media/base/demuxer_stream.h"
#include "media/base/video_decoder.h"
#include "media/video/video_decode_accelerator.h"
@@ -78,10 +77,11 @@ class MEDIA_EXPORT GpuVideoDecoder
const scoped_refptr<Factories>& factories);
// VideoDecoder implementation.
- virtual void Initialize(DemuxerStream* stream,
+ virtual void Initialize(const VideoDecoderConfig& config,
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) OVERRIDE;
- virtual void Read(const ReadCB& read_cb) OVERRIDE;
+ virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
+ const ReadCB& read_cb) OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
virtual void Stop(const base::Closure& closure) OVERRIDE;
virtual bool HasAlpha() const OVERRIDE;
@@ -111,17 +111,9 @@ class MEDIA_EXPORT GpuVideoDecoder
kError
};
- // If no demuxer read is in flight and no bitstream buffers are in the
- // decoder, kick some off demuxing/decoding.
- void EnsureDemuxOrDecode();
-
// Return true if more decode work can be piled on to the VDA.
bool CanMoreDecodeWorkBeDone();
- // Callback to pass to demuxer_stream_->Read() for receiving encoded bits.
- void RequestBufferDecode(DemuxerStream::Status status,
- const scoped_refptr<DecoderBuffer>& buffer);
-
// Enqueue a frame for later delivery (or drop it on the floor if a
// vda->Reset() is in progress) and trigger out-of-line delivery of the oldest
// ready frame to the client if there is a pending read. A NULL |frame|
@@ -166,8 +158,6 @@ class MEDIA_EXPORT GpuVideoDecoder
StatisticsCB statistics_cb_;
- // Pointer to the demuxer stream that will feed us compressed buffers.
- DemuxerStream* demuxer_stream_;
bool needs_bitstream_conversion_;
@@ -201,6 +191,8 @@ class MEDIA_EXPORT GpuVideoDecoder
State state_;
+ VideoDecoderConfig config_;
+
// Is a demuxer read in flight?
bool demuxer_read_in_progress_;

Powered by Google App Engine
This is Rietveld 408576698