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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_DECODER_FACTORY_H_ 5 #ifndef MEDIA_BASE_DECODER_FACTORY_H_
6 #define MEDIA_BASE_DECODER_FACTORY_H_ 6 #define MEDIA_BASE_DECODER_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
10 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
11 12
13 namespace base {
14 class SingleThreadTaskRunner;
15 }
16
12 namespace media { 17 namespace media {
13 18
14 class AudioDecoder; 19 class AudioDecoder;
15 class VideoDecoder; 20 class VideoDecoder;
16 21
17 // A factory class for creating audio and video decoders. 22 // A factory class for creating audio and video decoders.
18 class MEDIA_EXPORT DecoderFactory { 23 class MEDIA_EXPORT DecoderFactory {
19 public: 24 public:
20 DecoderFactory(); 25 DecoderFactory();
21 virtual ~DecoderFactory(); 26 virtual ~DecoderFactory();
22 27
23 // Creates audio decoders and append them to the end of |audio_decoders|. 28 // Creates audio decoders and append them to the end of |audio_decoders|.
24 virtual void CreateAudioDecoders(ScopedVector<AudioDecoder>* audio_decoders); 29 // Decoders are single-threaded, each decoder should run on |task_runner|.
30 virtual void CreateAudioDecoders(
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
32 ScopedVector<AudioDecoder>* audio_decoders);
25 33
26 // Creates video decoders and append them to the end of |video_decoders|. 34 // Creates video decoders and append them to the end of |video_decoders|.
27 virtual void CreateVideoDecoders(ScopedVector<VideoDecoder>* video_decoders); 35 // Decoders are single-threaded, each decoder should run on |task_runner|.
36 virtual void CreateVideoDecoders(
37 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
38 ScopedVector<VideoDecoder>* video_decoders);
28 39
29 private: 40 private:
30 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); 41 DISALLOW_COPY_AND_ASSIGN(DecoderFactory);
31 }; 42 };
32 43
33 } // namespace media 44 } // namespace media
34 45
35 #endif // MEDIA_BASE_DECODER_FACTORY_H_ 46 #endif // MEDIA_BASE_DECODER_FACTORY_H_
OLDNEW
« 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