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

Unified Diff: media/filters/ffmpeg_video_decoder.h

Issue 16274005: Separate DemuxerStream and VideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 Created 7 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/fake_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.h
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index 2db72a246e7ef563587b8c126c02f57c19315b04..c2b08985997a9790e1a66256de6ea259635e7d53 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -9,8 +9,8 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
-#include "media/base/demuxer_stream.h"
#include "media/base/video_decoder.h"
+#include "media/base/video_decoder_config.h"
struct AVCodecContext;
struct AVFrame;
@@ -30,10 +30,11 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
virtual ~FFmpegVideoDecoder();
// 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;
@@ -51,15 +52,10 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
kError
};
- // Reads from the demuxer stream and corresponding read callback.
- void ReadFromDemuxerStream();
- void BufferReady(DemuxerStream::Status status,
- const scoped_refptr<DecoderBuffer>& buffer);
-
// Handles decoding an unencrypted encoded buffer.
void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer);
- bool Decode(const scoped_refptr<DecoderBuffer>& buffer,
- scoped_refptr<VideoFrame>* video_frame);
+ bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer,
+ scoped_refptr<VideoFrame>* video_frame);
// Handles (re-)initializing the decoder with a (new) config.
// Returns true if initialization was successful.
@@ -87,8 +83,7 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
AVCodecContext* codec_context_;
AVFrame* av_frame_;
- // Pointer to the demuxer stream that will feed us compressed buffers.
- DemuxerStream* demuxer_stream_;
+ VideoDecoderConfig config_;
DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
};
« no previous file with comments | « media/filters/fake_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698