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

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

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

Powered by Google App Engine
This is Rietveld 408576698