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

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

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "cc/layers/video_frame_provider.h" 13 #include "cc/layers/video_frame_provider.h"
14 #include "media/filters/skcanvas_video_renderer.h" 14 #include "media/filters/skcanvas_video_renderer.h"
15 #include "skia/ext/platform_canvas.h" 15 #include "skia/ext/platform_canvas.h"
16 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 16 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace blink { 19 namespace blink {
20 class WebFrame; 20 class WebFrame;
21 class WebMediaPlayerClient; 21 class WebMediaPlayerClient;
22 } 22 }
23 23
24 namespace media { 24 namespace media {
25 class MediaLog; 25 class MediaLog;
26 } 26 }
27 27
28 namespace cc_blink {
29 class WebLayerImpl;
30 }
28 31
29 namespace content { 32 namespace content {
30 class MediaStreamAudioRenderer; 33 class MediaStreamAudioRenderer;
31 class MediaStreamRendererFactory; 34 class MediaStreamRendererFactory;
32 class VideoFrameProvider; 35 class VideoFrameProvider;
33 class WebLayerImpl;
34 class WebMediaPlayerDelegate; 36 class WebMediaPlayerDelegate;
35 37
36 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to 38 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to
37 // Chrome's media player when "src" is from media stream. 39 // Chrome's media player when "src" is from media stream.
38 // 40 //
39 // WebMediaPlayerMS works with multiple objects, the most important ones are: 41 // WebMediaPlayerMS works with multiple objects, the most important ones are:
40 // 42 //
41 // VideoFrameProvider 43 // VideoFrameProvider
42 // provides video frames for rendering. 44 // provides video frames for rendering.
43 // 45 //
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // modifications on the main thread, and all reads on the compositing thread. 163 // modifications on the main thread, and all reads on the compositing thread.
162 scoped_refptr<media::VideoFrame> current_frame_; 164 scoped_refptr<media::VideoFrame> current_frame_;
163 // |current_frame_used_| is updated on both main and compositing thread. 165 // |current_frame_used_| is updated on both main and compositing thread.
164 // It's used to track whether |current_frame_| was painted for detecting 166 // It's used to track whether |current_frame_| was painted for detecting
165 // when to increase |dropped_frame_count_|. 167 // when to increase |dropped_frame_count_|.
166 bool current_frame_used_; 168 bool current_frame_used_;
167 // |current_frame_lock_| protects |current_frame_used_| and |current_frame_|. 169 // |current_frame_lock_| protects |current_frame_used_| and |current_frame_|.
168 base::Lock current_frame_lock_; 170 base::Lock current_frame_lock_;
169 bool pending_repaint_; 171 bool pending_repaint_;
170 172
171 scoped_ptr<WebLayerImpl> video_weblayer_; 173 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_;
172 174
173 // A pointer back to the compositor to inform it about state changes. This is 175 // A pointer back to the compositor to inform it about state changes. This is
174 // not NULL while the compositor is actively using this webmediaplayer. 176 // not NULL while the compositor is actively using this webmediaplayer.
175 cc::VideoFrameProvider::Client* video_frame_provider_client_; 177 cc::VideoFrameProvider::Client* video_frame_provider_client_;
176 178
177 bool received_first_frame_; 179 bool received_first_frame_;
178 base::TimeDelta current_time_; 180 base::TimeDelta current_time_;
179 unsigned total_frame_count_; 181 unsigned total_frame_count_;
180 unsigned dropped_frame_count_; 182 unsigned dropped_frame_count_;
181 media::SkCanvasVideoRenderer video_renderer_; 183 media::SkCanvasVideoRenderer video_renderer_;
182 184
183 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_; 185 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_;
184 186
185 scoped_refptr<media::MediaLog> media_log_; 187 scoped_refptr<media::MediaLog> media_log_;
186 188
187 scoped_ptr<MediaStreamRendererFactory> renderer_factory_; 189 scoped_ptr<MediaStreamRendererFactory> renderer_factory_;
188 190
189 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); 191 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS);
190 }; 192 };
191 193
192 } // namespace content 194 } // namespace content
193 195
194 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 196 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698