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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_compositor.h

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj's comments 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "cc/layers/video_frame_provider.h" 18 #include "cc/layers/video_frame_provider.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 20
21 namespace base { 21 namespace base {
22 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
23 } 23 }
24 24
25 namespace blink { 25 namespace blink {
26 class WebURL; 26 class WebMediaStream;
27 } 27 }
28 28
29 namespace gfx { 29 namespace gfx {
30 class Size; 30 class Size;
31 } 31 }
32 32
33 namespace media { 33 namespace media {
34 class SkCanvasVideoRenderer; 34 class SkCanvasVideoRenderer;
35 class VideoRendererAlgorithm; 35 class VideoRendererAlgorithm;
36 } 36 }
(...skipping 12 matching lines...) Expand all
49 // frame, and submit it whenever asked by the compositor. 49 // frame, and submit it whenever asked by the compositor.
50 class CONTENT_EXPORT WebMediaPlayerMSCompositor 50 class CONTENT_EXPORT WebMediaPlayerMSCompositor
51 : public NON_EXPORTED_BASE(cc::VideoFrameProvider) { 51 : public NON_EXPORTED_BASE(cc::VideoFrameProvider) {
52 public: 52 public:
53 // This |url| represents the media stream we are rendering. |url| is used to 53 // This |url| represents the media stream we are rendering. |url| is used to
54 // find out what web stream this WebMediaPlayerMSCompositor is playing, and 54 // find out what web stream this WebMediaPlayerMSCompositor is playing, and
55 // together with flag "--disable-rtc-smoothness-algorithm" determine whether 55 // together with flag "--disable-rtc-smoothness-algorithm" determine whether
56 // we enable algorithm or not. 56 // we enable algorithm or not.
57 WebMediaPlayerMSCompositor( 57 WebMediaPlayerMSCompositor(
58 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 58 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
59 const blink::WebURL& url, 59 const blink::WebMediaStream& web_stream,
60 const base::WeakPtr<WebMediaPlayerMS>& player); 60 const base::WeakPtr<WebMediaPlayerMS>& player);
61 61
62 ~WebMediaPlayerMSCompositor() override; 62 ~WebMediaPlayerMSCompositor() override;
63 63
64 void EnqueueFrame(const scoped_refptr<media::VideoFrame>& frame); 64 void EnqueueFrame(const scoped_refptr<media::VideoFrame>& frame);
65 65
66 // Statistical data 66 // Statistical data
67 gfx::Size GetCurrentSize(); 67 gfx::Size GetCurrentSize();
68 base::TimeDelta GetCurrentTime(); 68 base::TimeDelta GetCurrentTime();
69 size_t total_frame_count() const; 69 size_t total_frame_count() const;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // |current_frame_lock_| protects |current_frame_used_by_compositor_|, 148 // |current_frame_lock_| protects |current_frame_used_by_compositor_|,
149 // |current_frame_|, and |rendering_frame_buffer_|. 149 // |current_frame_|, and |rendering_frame_buffer_|.
150 base::Lock current_frame_lock_; 150 base::Lock current_frame_lock_;
151 151
152 // Make sure the weak pointer factory member is the last member of the class. 152 // Make sure the weak pointer factory member is the last member of the class.
153 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_; 153 base::WeakPtrFactory<WebMediaPlayerMSCompositor> weak_ptr_factory_;
154 154
155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor); 155 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMSCompositor);
156 }; 156 };
157 } 157 } // namespace content
158 158
159 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H 159 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698