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

Unified Diff: media/filters/ffmpeg_video_decoder.h

Issue 9632024: Create video and audio decoder threads on demand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Log an error when Initialize is called more than once. Created 8 years, 9 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 cd60c2e2a6ccb59ee2f1476682b8fec96c93995b..9ff153f4dea88009584542c80c7ec1a4cad3171c 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -7,6 +7,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/filters.h"
#include "media/crypto/aes_decryptor.h"
@@ -21,7 +22,7 @@ namespace media {
class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
public:
- explicit FFmpegVideoDecoder(MessageLoop* message_loop);
+ FFmpegVideoDecoder(const base::Callback<MessageLoop*()>& message_loop_cb);
virtual ~FFmpegVideoDecoder();
// Filter implementation.
@@ -68,6 +69,9 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// the current state of |codec_context_|.
scoped_refptr<VideoFrame> AllocateVideoFrame();
+ // This is !is_null() iff Initialize() hasn't been called.
+ base::Callback<MessageLoop*()> message_loop_factory_cb_;
+
MessageLoop* message_loop_;
DecoderState state_;

Powered by Google App Engine
This is Rietveld 408576698