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

Unified Diff: media/filters/ffmpeg_audio_decoder.h

Issue 9632024: Create video and audio decoder threads on demand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « media/base/message_loop_factory_for_test.cc ('k') | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.h
diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h
index edf93345bdec109c5f261c7e7b3ca2b235cd7004..eb4ea2d3bddaad8ef09dd6108c18292729aced05 100644
--- a/media/filters/ffmpeg_audio_decoder.h
+++ b/media/filters/ffmpeg_audio_decoder.h
@@ -15,10 +15,12 @@ struct AVCodecContext;
namespace media {
class DataBuffer;
+class MessageLoopFactory;
class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
public:
- explicit FFmpegAudioDecoder(MessageLoop* message_loop);
+ FFmpegAudioDecoder(MessageLoopFactory* loop_factory,
Ami GONE FROM CHROMIUM 2012/03/08 16:32:07 You could avoid the need for the MessageLoopFactor
tommi (sloooow) - chröme 2012/03/09 10:07:15 That's so clever it can't possibly work! hehe, muc
+ const std::string& loop_name);
virtual ~FFmpegAudioDecoder();
// AudioDecoder implementation.
@@ -55,6 +57,10 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
// Delivers decoded samples to |read_cb_| and resets the callback.
void DeliverSamples(const scoped_refptr<Buffer>& samples);
+ MessageLoop* EnsureMessageLoop();
Ami GONE FROM CHROMIUM 2012/03/08 16:32:07 This idiom seems to me either racy or unnecessary.
tommi (sloooow) - chröme 2012/03/09 10:07:15 Removed EML and now only initialize message_loop_
+
+ MessageLoopFactory* message_loop_factory_;
+ const std::string loop_name_;
MessageLoop* message_loop_;
scoped_refptr<DemuxerStream> demuxer_stream_;
« no previous file with comments | « media/base/message_loop_factory_for_test.cc ('k') | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698