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

Unified Diff: media/filters/ffmpeg_video_decoder.h

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/ffmpeg_video_decoder.h
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index c8481a24f92229b53459e76e59ede5f6d797699e..faa4b4a43208d4f041189964a7e8a02aa1151d54 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -34,7 +34,8 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// VideoDecoder implementation.
virtual void Initialize(const VideoDecoderConfig& config,
bool low_delay,
- const PipelineStatusCB& status_cb) OVERRIDE;
+ const PipelineStatusCB& status_cb,
+ const OutputCB& output_cb) OVERRIDE;
virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
@@ -49,15 +50,13 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
enum DecoderState {
kUninitialized,
kNormal,
- kFlushCodec,
kDecodeFinished,
kError
};
// Handles decoding an unencrypted encoded buffer.
- void DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer);
bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer,
- scoped_refptr<VideoFrame>* video_frame);
+ bool* produced_frame);
// Handles (re-)initializing the decoder with a (new) config.
// Returns true if initialization was successful.
@@ -71,8 +70,7 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
DecoderState state_;
- // TODO(xhwang): Merge DecodeBuffer() into Decode() and remove this.
- DecodeCB decode_cb_;
+ OutputCB output_cb_;
// FFmpeg structures owned by this object.
scoped_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;

Powered by Google App Engine
This is Rietveld 408576698