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

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

Issue 18261007: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 AGAIN Created 7 years, 5 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 WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
6 #define WEBKIT_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 "cc/layers/video_frame_provider.h" 12 #include "cc/layers/video_frame_provider.h"
13 #include "media/filters/skcanvas_video_renderer.h" 13 #include "media/filters/skcanvas_video_renderer.h"
14 #include "skia/ext/platform_canvas.h" 14 #include "skia/ext/platform_canvas.h"
15 #include "third_party/WebKit/public/web/WebMediaPlayer.h" 15 #include "third_party/WebKit/public/web/WebMediaPlayer.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace WebKit { 18 namespace WebKit {
19 class WebFrame; 19 class WebFrame;
20 class WebMediaPlayerClient; 20 class WebMediaPlayerClient;
21 } 21 }
22 22
23 namespace media { 23 namespace media {
24 class MediaLog; 24 class MediaLog;
25 } 25 }
26 26
27 namespace webkit { 27 namespace webkit {
28 class WebLayerImpl; 28 class WebLayerImpl;
29 } 29 }
30 30
31 namespace webkit_media { 31 namespace content {
32
33 class MediaStreamAudioRenderer; 32 class MediaStreamAudioRenderer;
34 class MediaStreamClient; 33 class MediaStreamClient;
35 class VideoFrameProvider; 34 class VideoFrameProvider;
36 class WebMediaPlayerDelegate; 35 class WebMediaPlayerDelegate;
37 36
38 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to 37 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to
39 // Chrome's media player when "src" is from media stream. 38 // Chrome's media player when "src" is from media stream.
40 // 39 //
41 // WebMediaPlayerMS works with multiple objects, the most important ones are: 40 // WebMediaPlayerMS works with multiple objects, the most important ones are:
42 // 41 //
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 WebKit::WebTimeRanges buffered_; 145 WebKit::WebTimeRanges buffered_;
147 146
148 // Used for DCHECKs to ensure methods calls executed in the correct thread. 147 // Used for DCHECKs to ensure methods calls executed in the correct thread.
149 base::ThreadChecker thread_checker_; 148 base::ThreadChecker thread_checker_;
150 149
151 WebKit::WebMediaPlayerClient* client_; 150 WebKit::WebMediaPlayerClient* client_;
152 151
153 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 152 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
154 153
155 MediaStreamClient* media_stream_client_; 154 MediaStreamClient* media_stream_client_;
156 scoped_refptr<webkit_media::VideoFrameProvider> video_frame_provider_; 155
156 // Specify content:: to disambiguate from cc::.
157 scoped_refptr<content::VideoFrameProvider> video_frame_provider_;
157 bool paused_; 158 bool paused_;
158 159
159 // |current_frame_| is updated only on main thread. The object it holds 160 // |current_frame_| is updated only on main thread. The object it holds
160 // can be freed on the compositor thread if it is the last to hold a 161 // can be freed on the compositor thread if it is the last to hold a
161 // reference but media::VideoFrame is a thread-safe ref-pointer. 162 // reference but media::VideoFrame is a thread-safe ref-pointer.
162 scoped_refptr<media::VideoFrame> current_frame_; 163 scoped_refptr<media::VideoFrame> current_frame_;
163 // |current_frame_used_| is updated on both main and compositing thread. 164 // |current_frame_used_| is updated on both main and compositing thread.
164 // It's used to track whether |current_frame_| was painted for detecting 165 // It's used to track whether |current_frame_| was painted for detecting
165 // when to increase |dropped_frame_count_|. 166 // when to increase |dropped_frame_count_|.
166 bool current_frame_used_; 167 bool current_frame_used_;
(...skipping 13 matching lines...) Expand all
180 unsigned dropped_frame_count_; 181 unsigned dropped_frame_count_;
181 media::SkCanvasVideoRenderer video_renderer_; 182 media::SkCanvasVideoRenderer video_renderer_;
182 183
183 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_; 184 scoped_refptr<MediaStreamAudioRenderer> audio_renderer_;
184 185
185 scoped_refptr<media::MediaLog> media_log_; 186 scoped_refptr<media::MediaLog> media_log_;
186 187
187 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); 188 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS);
188 }; 189 };
189 190
190 } // namespace webkit_media 191 } // namespace content
191 192
192 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 193 #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