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

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

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 8 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 | « media/base/pipeline_impl_unittest.cc ('k') | media/base/seekable_buffer_unittest.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 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_BASE_RENDERER_FACTORY_H_ 5 #ifndef MEDIA_BASE_RENDERER_FACTORY_H_
6 #define MEDIA_BASE_RENDERER_FACTORY_H_ 6 #define MEDIA_BASE_RENDERER_FACTORY_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
12 #include "media/base/renderer.h" 13 #include "media/base/renderer.h"
13 #include "media/base/surface_manager.h" 14 #include "media/base/surface_manager.h"
14 15
15 namespace base { 16 namespace base {
16 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
17 class TaskRunner; 18 class TaskRunner;
18 } 19 }
19 20
20 namespace media { 21 namespace media {
21 22
22 class AudioRendererSink; 23 class AudioRendererSink;
23 class VideoRendererSink; 24 class VideoRendererSink;
24 25
25 // A factory class for creating media::Renderer to be used by media pipeline. 26 // A factory class for creating media::Renderer to be used by media pipeline.
26 class MEDIA_EXPORT RendererFactory { 27 class MEDIA_EXPORT RendererFactory {
27 public: 28 public:
28 RendererFactory(); 29 RendererFactory();
29 virtual ~RendererFactory(); 30 virtual ~RendererFactory();
30 31
31 // Creates and returns a Renderer. All methods of the created Renderer except 32 // Creates and returns a Renderer. All methods of the created Renderer except
32 // for GetMediaTime() will be called on the |media_task_runner|. 33 // for GetMediaTime() will be called on the |media_task_runner|.
33 // GetMediaTime() could be called on any thread. 34 // GetMediaTime() could be called on any thread.
34 // The created Renderer can use |audio_renderer_sink| to render audio and 35 // The created Renderer can use |audio_renderer_sink| to render audio and
35 // |video_renderer_sink| to render video. 36 // |video_renderer_sink| to render video.
36 virtual scoped_ptr<Renderer> CreateRenderer( 37 virtual std::unique_ptr<Renderer> CreateRenderer(
37 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 38 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
38 const scoped_refptr<base::TaskRunner>& worker_task_runner, 39 const scoped_refptr<base::TaskRunner>& worker_task_runner,
39 AudioRendererSink* audio_renderer_sink, 40 AudioRendererSink* audio_renderer_sink,
40 VideoRendererSink* video_renderer_sink, 41 VideoRendererSink* video_renderer_sink,
41 const RequestSurfaceCB& request_surface_cb) = 0; 42 const RequestSurfaceCB& request_surface_cb) = 0;
42 43
43 private: 44 private:
44 DISALLOW_COPY_AND_ASSIGN(RendererFactory); 45 DISALLOW_COPY_AND_ASSIGN(RendererFactory);
45 }; 46 };
46 47
47 } // namespace media 48 } // namespace media
48 49
49 #endif // MEDIA_BASE_RENDERER_FACTORY_H_ 50 #endif // MEDIA_BASE_RENDERER_FACTORY_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | media/base/seekable_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698