| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/public/renderer/media_stream_audio_renderer.h" | 12 #include "content/public/renderer/media_stream_audio_renderer.h" |
| 13 #include "content/public/renderer/video_frame_provider.h" | 13 #include "content/public/renderer/video_frame_provider.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 #include "url/origin.h" | 15 #include "url/origin.h" |
| 16 | 16 |
| 17 namespace base { |
| 18 class SingleThreadTaskRunner; |
| 19 class TaskRunner; |
| 20 } // namespace base |
| 21 |
| 22 namespace media { |
| 23 class GpuVideoAcceleratorFactories; |
| 24 } // namespace media |
| 25 |
| 17 namespace content { | 26 namespace content { |
| 18 | 27 |
| 19 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and | 28 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and |
| 20 // video feeds from a MediaStream provided an URL. | 29 // video feeds from a MediaStream provided an URL. |
| 21 // The factory methods are virtual in order for blink layouttests to be able to | 30 // The factory methods are virtual in order for blink layouttests to be able to |
| 22 // override them. | 31 // override them. |
| 23 class MediaStreamRendererFactory { | 32 class MediaStreamRendererFactory { |
| 24 public: | 33 public: |
| 25 virtual ~MediaStreamRendererFactory() {} | 34 virtual ~MediaStreamRendererFactory() {} |
| 26 | 35 |
| 27 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 36 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
| 28 const GURL& url, | 37 const GURL& url, |
| 29 const base::Closure& error_cb, | 38 const base::Closure& error_cb, |
| 30 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; | 39 const VideoFrameProvider::RepaintCB& repaint_cb, |
| 40 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, |
| 41 const scoped_refptr<base::TaskRunner>& worker_task_runner, |
| 42 const scoped_refptr<media::GpuVideoAcceleratorFactories>& |
| 43 gpu_factories) = 0; |
| 31 | 44 |
| 32 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( | 45 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
| 33 const GURL& url, | 46 const GURL& url, |
| 34 int render_frame_id, | 47 int render_frame_id, |
| 35 const std::string& device_id, | 48 const std::string& device_id, |
| 36 const url::Origin& security_origin) = 0; | 49 const url::Origin& security_origin) = 0; |
| 37 }; | 50 }; |
| 38 | 51 |
| 39 } // namespace content | 52 } // namespace content |
| 40 | 53 |
| 41 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ | 54 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ |
| OLD | NEW |