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

Side by Side Diff: media/base/decoder_factory.h

Issue 2871503002: Remove ScopedVector from audio/video renderer related code in media/ (Closed)
Patch Set: Address xhwang's comments and delete some useless includes Created 3 years, 7 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 | « no previous file | 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 <memory>
9 #include <vector>
10
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_vector.h"
11 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
12 14
13 namespace base { 15 namespace base {
14 class SingleThreadTaskRunner; 16 class SingleThreadTaskRunner;
15 } 17 }
16 18
17 namespace media { 19 namespace media {
18 20
19 class AudioDecoder; 21 class AudioDecoder;
20 class GpuVideoAcceleratorFactories; 22 class GpuVideoAcceleratorFactories;
21 class VideoDecoder; 23 class VideoDecoder;
22 24
23 // A factory class for creating audio and video decoders. 25 // A factory class for creating audio and video decoders.
24 class MEDIA_EXPORT DecoderFactory { 26 class MEDIA_EXPORT DecoderFactory {
25 public: 27 public:
26 DecoderFactory(); 28 DecoderFactory();
27 virtual ~DecoderFactory(); 29 virtual ~DecoderFactory();
28 30
29 // Creates audio decoders and append them to the end of |audio_decoders|. 31 // Creates audio decoders and append them to the end of |audio_decoders|.
30 // Decoders are single-threaded, each decoder should run on |task_runner|. 32 // Decoders are single-threaded, each decoder should run on |task_runner|.
31 virtual void CreateAudioDecoders( 33 virtual void CreateAudioDecoders(
32 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 34 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
33 ScopedVector<AudioDecoder>* audio_decoders); 35 std::vector<std::unique_ptr<AudioDecoder>>* audio_decoders);
34 36
35 // Creates video decoders and append them to the end of |video_decoders|. 37 // Creates video decoders and append them to the end of |video_decoders|.
36 // Decoders are single-threaded, each decoder should run on |task_runner|. 38 // Decoders are single-threaded, each decoder should run on |task_runner|.
37 virtual void CreateVideoDecoders( 39 virtual void CreateVideoDecoders(
38 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
39 GpuVideoAcceleratorFactories* gpu_factories, 41 GpuVideoAcceleratorFactories* gpu_factories,
40 ScopedVector<VideoDecoder>* video_decoders); 42 std::vector<std::unique_ptr<VideoDecoder>>* video_decoders);
41 43
42 private: 44 private:
43 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); 45 DISALLOW_COPY_AND_ASSIGN(DecoderFactory);
44 }; 46 };
45 47
46 } // namespace media 48 } // namespace media
47 49
48 #endif // MEDIA_BASE_DECODER_FACTORY_H_ 50 #endif // MEDIA_BASE_DECODER_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/decoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698