Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ | 6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/renderer/media_stream_audio_renderer.h" | 10 #include "content/public/renderer/media_stream_audio_renderer.h" |
| 11 #include "content/public/renderer/video_frame_provider.h" | 11 #include "content/public/renderer/video_frame_provider.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace base { | |
| 15 class SingleThreadTaskRunner; | |
|
Daniele Castagna
2015/10/07 19:57:11
nit: no spaces at the beginning of the line.
emircan
2015/10/08 01:44:24
Done.
| |
| 16 class TaskRunner; | |
| 17 } | |
|
Daniele Castagna
2015/10/07 19:57:11
nit: // namespace base
emircan
2015/10/08 01:44:24
Done.
| |
| 18 | |
| 19 namespace media { | |
| 20 class GpuVideoAcceleratorFactories; | |
| 21 } | |
| 22 | |
| 14 namespace content { | 23 namespace content { |
| 15 | 24 |
| 16 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and | 25 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and |
| 17 // video feeds from a MediaStream provided an URL. | 26 // video feeds from a MediaStream provided an URL. |
| 18 // The factory methods are virtual in order for blink layouttests to be able to | 27 // The factory methods are virtual in order for blink layouttests to be able to |
| 19 // override them. | 28 // override them. |
| 20 class MediaStreamRendererFactory { | 29 class MediaStreamRendererFactory { |
| 21 public: | 30 public: |
| 22 virtual ~MediaStreamRendererFactory() {} | 31 virtual ~MediaStreamRendererFactory() {} |
| 23 | 32 |
| 24 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 33 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
| 25 const GURL& url, | 34 const GURL& url, |
| 26 const base::Closure& error_cb, | 35 const base::Closure& error_cb, |
| 27 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; | 36 const VideoFrameProvider::RepaintCB& repaint_cb, |
| 37 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, | |
| 38 const scoped_refptr<base::TaskRunner>& worker_task_runner, | |
| 39 const scoped_refptr<media::GpuVideoAcceleratorFactories>& | |
| 40 gpu_factories) = 0; | |
| 28 | 41 |
| 29 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( | 42 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
| 30 const GURL& url, | 43 const GURL& url, |
| 31 int render_frame_id) = 0; | 44 int render_frame_id) = 0; |
| 32 }; | 45 }; |
| 33 | 46 |
| 34 } // namespace content | 47 } // namespace content |
| 35 | 48 |
| 36 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ | 49 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ |
| OLD | NEW |