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

Side by Side Diff: webkit/glue/webmediaplayer_impl.h

Issue 7480032: Plumb media data from renderers up to MediaInternals in the browser process. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Much cleanup and making MediaLog thread safe. Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains PipelineImpl which is the actual media player pipeline, it glues 6 // It contains PipelineImpl which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer. 7 // the media player pipeline, data source, audio renderer and renderer.
8 // PipelineImpl would creates multiple threads and access some public methods 8 // PipelineImpl would creates multiple threads and access some public methods
9 // of this class, so we need to be extra careful about concurrent access of 9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members. 10 // methods and members.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 #include "base/memory/ref_counted.h" 56 #include "base/memory/ref_counted.h"
57 #include "base/memory/scoped_ptr.h" 57 #include "base/memory/scoped_ptr.h"
58 #include "base/message_loop.h" 58 #include "base/message_loop.h"
59 #include "base/threading/thread.h" 59 #include "base/threading/thread.h"
60 #include "base/synchronization/lock.h" 60 #include "base/synchronization/lock.h"
61 #include "base/synchronization/waitable_event.h" 61 #include "base/synchronization/waitable_event.h"
62 #include "media/filters/chunk_demuxer.h" 62 #include "media/filters/chunk_demuxer.h"
63 #include "media/filters/chunk_demuxer_client.h" 63 #include "media/filters/chunk_demuxer_client.h"
64 #include "media/base/filters.h" 64 #include "media/base/filters.h"
65 #include "media/base/media_log.h"
65 #include "media/base/message_loop_factory.h" 66 #include "media/base/message_loop_factory.h"
66 #include "media/base/pipeline.h" 67 #include "media/base/pipeline.h"
67 #include "skia/ext/platform_canvas.h" 68 #include "skia/ext/platform_canvas.h"
68 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 69 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
69 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
70 #include "ui/gfx/rect.h" 71 #include "ui/gfx/rect.h"
71 #include "ui/gfx/size.h" 72 #include "ui/gfx/size.h"
72 #include "webkit/glue/media/web_data_source.h" 73 #include "webkit/glue/media/web_data_source.h"
73 74
74 class GURL; 75 class GURL;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // provided by WebKit to perform renderering. The simple data source does 202 // provided by WebKit to perform renderering. The simple data source does
202 // resource loading by loading the whole resource object into memory. Null 203 // resource loading by loading the whole resource object into memory. Null
203 // audio renderer is a fake audio device that plays silence. Provider of the 204 // audio renderer is a fake audio device that plays silence. Provider of the
204 // |collection| can override the default filters by adding extra filters to 205 // |collection| can override the default filters by adding extra filters to
205 // |collection| before calling this method. 206 // |collection| before calling this method.
206 // 207 //
207 // Callers must call |Initialize()| before they can use the object. 208 // Callers must call |Initialize()| before they can use the object.
208 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, 209 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client,
209 media::FilterCollection* collection, 210 media::FilterCollection* collection,
210 media::MessageLoopFactory* message_loop_factory, 211 media::MessageLoopFactory* message_loop_factory,
211 MediaStreamClient* media_stream_client); 212 MediaStreamClient* media_stream_client,
213 media::MediaLog* media_log);
212 virtual ~WebMediaPlayerImpl(); 214 virtual ~WebMediaPlayerImpl();
213 215
214 // Finalizes initialization of the object. 216 // Finalizes initialization of the object.
215 bool Initialize( 217 bool Initialize(
216 WebKit::WebFrame* frame, 218 WebKit::WebFrame* frame,
217 bool use_simple_data_source, 219 bool use_simple_data_source,
218 scoped_refptr<WebVideoRenderer> web_video_renderer); 220 scoped_refptr<WebVideoRenderer> web_video_renderer);
219 221
220 virtual void load(const WebKit::WebURL& url); 222 virtual void load(const WebKit::WebURL& url);
221 virtual void cancelLoad(); 223 virtual void cancelLoad();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 WebKit::WebMediaPlayerClient* client_; 356 WebKit::WebMediaPlayerClient* client_;
355 357
356 scoped_refptr<Proxy> proxy_; 358 scoped_refptr<Proxy> proxy_;
357 359
358 MediaStreamClient* media_stream_client_; 360 MediaStreamClient* media_stream_client_;
359 361
360 #if WEBKIT_USING_CG 362 #if WEBKIT_USING_CG
361 scoped_ptr<skia::PlatformCanvas> skia_canvas_; 363 scoped_ptr<skia::PlatformCanvas> skia_canvas_;
362 #endif 364 #endif
363 365
366 scoped_refptr<media::MediaLog> media_log_;
367
364 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 368 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
365 }; 369 };
366 370
367 } // namespace webkit_glue 371 } // namespace webkit_glue
368 372
369 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 373 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698