Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
|
sandersd (OOO until July 31)
2016/03/17 20:56:20
Please document what the task runner is for.
Tima Vaisburd
2016/03/17 21:08:33
Done.
| |
| 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 virtual void CreateAudioDecoders( |
| 30 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | |
| 31 ScopedVector<AudioDecoder>* audio_decoders); | |
| 25 | 32 |
| 26 // Creates video decoders and append them to the end of |video_decoders|. | 33 // Creates video decoders and append them to the end of |video_decoders|. |
| 27 virtual void CreateVideoDecoders(ScopedVector<VideoDecoder>* video_decoders); | 34 virtual void CreateVideoDecoders( |
| 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | |
| 36 ScopedVector<VideoDecoder>* video_decoders); | |
| 28 | 37 |
| 29 private: | 38 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); | 39 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); |
| 31 }; | 40 }; |
| 32 | 41 |
| 33 } // namespace media | 42 } // namespace media |
| 34 | 43 |
| 35 #endif // MEDIA_BASE_DECODER_FACTORY_H_ | 44 #endif // MEDIA_BASE_DECODER_FACTORY_H_ |
| OLD | NEW |