OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // 3. FFmpeg video decoder | 162 // 3. FFmpeg video decoder |
163 // 4. Video renderer | 163 // 4. Video renderer |
164 // 5. Null audio renderer | 164 // 5. Null audio renderer |
165 // The video renderer provided by this class is using the graphics context | 165 // The video renderer provided by this class is using the graphics context |
166 // provided by WebKit to perform renderering. The simple data source does | 166 // provided by WebKit to perform renderering. The simple data source does |
167 // resource loading by loading the whole resource object into memory. Null | 167 // resource loading by loading the whole resource object into memory. Null |
168 // audio renderer is a fake audio device that plays silence. Provider of the | 168 // audio renderer is a fake audio device that plays silence. Provider of the |
169 // |collection| can override the default filters by adding extra filters to | 169 // |collection| can override the default filters by adding extra filters to |
170 // |collection| before calling this method. | 170 // |collection| before calling this method. |
171 // | 171 // |
| 172 // Callers must call |Initialize()| before they can use the object. |
172 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, | 173 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, |
173 media::MediaFilterCollection* collection, | 174 media::MediaFilterCollection* collection); |
174 MediaResourceLoaderBridgeFactory* bridge_factory_simple, | |
175 MediaResourceLoaderBridgeFactory* bridge_factory_buffered, | |
176 bool use_simple_data_source, | |
177 scoped_refptr<WebVideoRenderer> web_video_renderer); | |
178 virtual ~WebMediaPlayerImpl(); | 175 virtual ~WebMediaPlayerImpl(); |
179 | 176 |
| 177 // Finalizes initialization of the object. |
| 178 bool Initialize( |
| 179 MediaResourceLoaderBridgeFactory* bridge_factory_simple, |
| 180 MediaResourceLoaderBridgeFactory* bridge_factory_buffered, |
| 181 bool use_simple_data_source, |
| 182 scoped_refptr<WebVideoRenderer> web_video_renderer); |
| 183 |
180 virtual void load(const WebKit::WebURL& url); | 184 virtual void load(const WebKit::WebURL& url); |
181 virtual void cancelLoad(); | 185 virtual void cancelLoad(); |
182 | 186 |
183 // Playback controls. | 187 // Playback controls. |
184 virtual void play(); | 188 virtual void play(); |
185 virtual void pause(); | 189 virtual void pause(); |
186 virtual bool supportsFullscreen() const; | 190 virtual bool supportsFullscreen() const; |
187 virtual bool supportsSave() const; | 191 virtual bool supportsSave() const; |
188 virtual void seek(float seconds); | 192 virtual void seek(float seconds); |
189 virtual void setEndTime(float seconds); | 193 virtual void setEndTime(float seconds); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 #if WEBKIT_USING_CG | 317 #if WEBKIT_USING_CG |
314 scoped_ptr<skia::PlatformCanvas> skia_canvas_; | 318 scoped_ptr<skia::PlatformCanvas> skia_canvas_; |
315 #endif | 319 #endif |
316 | 320 |
317 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 321 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
318 }; | 322 }; |
319 | 323 |
320 } // namespace webkit_glue | 324 } // namespace webkit_glue |
321 | 325 |
322 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 326 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |