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

Unified Diff: media/base/decoder_factory.h

Issue 1797393007: Connect MojoAudioDecoder to the service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created AudioDecoder in MediaInterfaceProvider Created 4 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 | « content/renderer/media/media_interface_provider.cc ('k') | media/base/decoder_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/decoder_factory.h
diff --git a/media/base/decoder_factory.h b/media/base/decoder_factory.h
index 21d66d21d1915c155eff82cdfb09e2ea4fbff572..9ae3f1b2b529c8f04c9c9536b9057c01dd4291bd 100644
--- a/media/base/decoder_factory.h
+++ b/media/base/decoder_factory.h
@@ -6,9 +6,14 @@
#define MEDIA_BASE_DECODER_FACTORY_H_
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "media/base/media_export.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace media {
class AudioDecoder;
@@ -21,10 +26,16 @@ class MEDIA_EXPORT DecoderFactory {
virtual ~DecoderFactory();
// Creates audio decoders and append them to the end of |audio_decoders|.
- virtual void CreateAudioDecoders(ScopedVector<AudioDecoder>* audio_decoders);
+ // Decoders are single-threaded, each decoder should run on |task_runner|.
+ virtual void CreateAudioDecoders(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ ScopedVector<AudioDecoder>* audio_decoders);
// Creates video decoders and append them to the end of |video_decoders|.
- virtual void CreateVideoDecoders(ScopedVector<VideoDecoder>* video_decoders);
+ // Decoders are single-threaded, each decoder should run on |task_runner|.
+ virtual void CreateVideoDecoders(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ ScopedVector<VideoDecoder>* video_decoders);
private:
DISALLOW_COPY_AND_ASSIGN(DecoderFactory);
« no previous file with comments | « content/renderer/media/media_interface_provider.cc ('k') | media/base/decoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698