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

Side by Side Diff: media/renderers/default_renderer_factory.h

Issue 2684103005: Allow media track switching. (Closed)
Patch Set: Added a LayoutTest for media track switching Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ 5 #ifndef MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_
6 #define MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ 6 #define MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "media/base/renderer_factory.h" 14 #include "media/base/renderer_factory.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 class AudioDecoder; 18 class AudioDecoder;
19 class AudioRendererSink; 19 class AudioRendererSink;
20 class DecoderFactory; 20 class DecoderFactory;
21 class GpuVideoAcceleratorFactories; 21 class GpuVideoAcceleratorFactories;
22 class MediaLog; 22 class MediaLog;
23 class VideoDecoder; 23 class VideoDecoder;
24 class VideoRendererSink; 24 class VideoRendererSink;
25 25
26 using CreateAudioDecodersCB = base::Callback<ScopedVector<AudioDecoder>()>;
27 using CreateVideoDecodersCB = base::Callback<ScopedVector<VideoDecoder>()>;
xhwang 2017/03/27 19:13:53 nit: Maybe use RepeatingCallback to make it clear
servolk 2017/03/27 22:34:13 Done.
28
26 // The default factory class for creating RendererImpl. 29 // The default factory class for creating RendererImpl.
27 class MEDIA_EXPORT DefaultRendererFactory : public RendererFactory { 30 class MEDIA_EXPORT DefaultRendererFactory : public RendererFactory {
28 public: 31 public:
29 using GetGpuFactoriesCB = base::Callback<GpuVideoAcceleratorFactories*()>; 32 using GetGpuFactoriesCB = base::Callback<GpuVideoAcceleratorFactories*()>;
30 33
31 DefaultRendererFactory(const scoped_refptr<MediaLog>& media_log, 34 DefaultRendererFactory(const scoped_refptr<MediaLog>& media_log,
32 DecoderFactory* decoder_factory, 35 DecoderFactory* decoder_factory,
33 const GetGpuFactoriesCB& get_gpu_factories_cb); 36 const GetGpuFactoriesCB& get_gpu_factories_cb);
34 ~DefaultRendererFactory() final; 37 ~DefaultRendererFactory() final;
35 38
(...skipping 20 matching lines...) Expand all
56 59
57 // Creates factories for supporting video accelerators. May be null. 60 // Creates factories for supporting video accelerators. May be null.
58 GetGpuFactoriesCB get_gpu_factories_cb_; 61 GetGpuFactoriesCB get_gpu_factories_cb_;
59 62
60 DISALLOW_COPY_AND_ASSIGN(DefaultRendererFactory); 63 DISALLOW_COPY_AND_ASSIGN(DefaultRendererFactory);
61 }; 64 };
62 65
63 } // namespace media 66 } // namespace media
64 67
65 #endif // MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ 68 #endif // MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698