| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
| 3 // in the LICENSE file. | 3 // 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // The actual pipeline and the thread it runs on. | 264 // The actual pipeline and the thread it runs on. |
| 265 scoped_refptr<media::PipelineImpl> pipeline_; | 265 scoped_refptr<media::PipelineImpl> pipeline_; |
| 266 base::Thread pipeline_thread_; | 266 base::Thread pipeline_thread_; |
| 267 | 267 |
| 268 // Playback state. | 268 // Playback state. |
| 269 // | 269 // |
| 270 // TODO(scherkus): we have these because Pipeline favours the simplicity of a | 270 // TODO(scherkus): we have these because Pipeline favours the simplicity of a |
| 271 // single "playback rate" over worrying about paused/stopped etc... It forces | 271 // single "playback rate" over worrying about paused/stopped etc... It forces |
| 272 // all clients to manage the pause+playback rate externally, but is that | 272 // all clients to manage the pause+playback rate externally, but is that |
| 273 // really a bad thing? | 273 // really a bad thing? |
| 274 // |
| 275 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want |
| 276 // to hang the render thread during pause(), we record the time at the same |
| 277 // time we pause and then return that value in currentTime(). Otherwise our |
| 278 // clock can creep forward a little bit while the asynchronous |
| 279 // SetPlaybackRate(0) is being executed. |
| 274 bool paused_; | 280 bool paused_; |
| 275 float playback_rate_; | 281 float playback_rate_; |
| 282 base::TimeDelta paused_time_; |
| 276 | 283 |
| 277 WebKit::WebMediaPlayerClient* client_; | 284 WebKit::WebMediaPlayerClient* client_; |
| 278 | 285 |
| 279 scoped_refptr<Proxy> proxy_; | 286 scoped_refptr<Proxy> proxy_; |
| 280 | 287 |
| 281 #if WEBKIT_USING_CG | 288 #if WEBKIT_USING_CG |
| 282 scoped_ptr<skia::PlatformCanvas> skia_canvas_; | 289 scoped_ptr<skia::PlatformCanvas> skia_canvas_; |
| 283 #endif | 290 #endif |
| 284 | 291 |
| 285 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 292 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 286 }; | 293 }; |
| 287 | 294 |
| 288 } // namespace webkit_glue | 295 } // namespace webkit_glue |
| 289 | 296 |
| 290 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 297 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |