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

Unified Diff: media/filters/ffmpeg_video_decoder.h

Issue 10704175: Add config change support to FFmpegVideoDecoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: media/filters/ffmpeg_video_decoder.h
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index 9302929137a0faf9b0090dc9d736643235c070c1..271cab27338c3be0cdc8ac68593395cf9a093fbf 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -72,6 +72,10 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// Delivers the frame to |read_cb_| and resets the callback.
void DeliverFrame(const scoped_refptr<VideoFrame>& video_frame);
+ // Allocate resources for |codec_context_| and |av_frame_| based
+ // on the information in |config|.
+ bool AllocateFFmpegResources(const VideoDecoderConfig& config);
+
// Releases resources associated with |codec_context_| and |av_frame_|
// and resets them to NULL.
void ReleaseFFmpegResources();
@@ -79,6 +83,11 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// Reset decoder and call |reset_cb_|.
void DoReset();
+ // Handles fetching a new config from the demuxer stream and
+ // reinitializing the decoder. Returns true if the config change
+ // was successful. Returns false if an error occured.
+ bool HandleConfigChange();
+
// This is !is_null() iff Initialize() hasn't been called.
base::Callback<MessageLoop*()> message_loop_factory_cb_;

Powered by Google App Engine
This is Rietveld 408576698