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

Side by Side Diff: content/public/renderer/media_stream_renderer_factory.h

Issue 2472273002: Move passing of WebRTC rendering frames from main thread to compositor thread (Closed)
Patch Set: wez@ nits. Created 4 years, 1 month 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 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"
(...skipping 18 matching lines...) Expand all
29 namespace content { 29 namespace content {
30 30
31 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and 31 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and
32 // video feeds from a MediaStream provided an URL. 32 // video feeds from a MediaStream provided an URL.
33 // The factory methods are virtual in order for blink layouttests to be able to 33 // The factory methods are virtual in order for blink layouttests to be able to
34 // override them. 34 // override them.
35 class MediaStreamRendererFactory { 35 class MediaStreamRendererFactory {
36 public: 36 public:
37 virtual ~MediaStreamRendererFactory() {} 37 virtual ~MediaStreamRendererFactory() {}
38 38
39 // Returns a MediaStreamVideoRenderer that uses the given task runners.
40 // |compositor_task_runner| is used for passing video frames.
41 // |media_task_runner|, |worker_task_runner| and |gpu_factories| are used to
42 // create an GpuMemoryBufferVideoFramePool instance on supported platforms.
39 virtual scoped_refptr<MediaStreamVideoRenderer> GetVideoRenderer( 43 virtual scoped_refptr<MediaStreamVideoRenderer> GetVideoRenderer(
40 const blink::WebMediaStream& web_stream, 44 const blink::WebMediaStream& web_stream,
41 const base::Closure& error_cb, 45 const base::Closure& error_cb,
42 const MediaStreamVideoRenderer::RepaintCB& repaint_cb, 46 const MediaStreamVideoRenderer::RepaintCB& repaint_cb,
47 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
43 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 48 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
44 const scoped_refptr<base::TaskRunner>& worker_task_runner, 49 const scoped_refptr<base::TaskRunner>& worker_task_runner,
45 media::GpuVideoAcceleratorFactories* gpu_factories) = 0; 50 media::GpuVideoAcceleratorFactories* gpu_factories) = 0;
46 51
47 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( 52 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer(
48 const blink::WebMediaStream& web_stream, 53 const blink::WebMediaStream& web_stream,
49 int render_frame_id, 54 int render_frame_id,
50 const std::string& device_id, 55 const std::string& device_id,
51 const url::Origin& security_origin) = 0; 56 const url::Origin& security_origin) = 0;
52 }; 57 };
53 58
54 } // namespace content 59 } // namespace content
55 60
56 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_ 61 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/media_stream_video_renderer.h » ('j') | content/renderer/media/webmediaplayer_ms.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698