| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 virtual void pause(); | 166 virtual void pause(); |
| 167 virtual bool supportsFullscreen() const; | 167 virtual bool supportsFullscreen() const; |
| 168 virtual bool supportsSave() const; | 168 virtual bool supportsSave() const; |
| 169 virtual void seek(float seconds); | 169 virtual void seek(float seconds); |
| 170 virtual void setEndTime(float seconds); | 170 virtual void setEndTime(float seconds); |
| 171 virtual void setRate(float rate); | 171 virtual void setRate(float rate); |
| 172 virtual void setVolume(float volume); | 172 virtual void setVolume(float volume); |
| 173 virtual void setVisible(bool visible); | 173 virtual void setVisible(bool visible); |
| 174 virtual bool setAutoBuffer(bool autoBuffer); | 174 virtual bool setAutoBuffer(bool autoBuffer); |
| 175 virtual bool totalBytesKnown(); | 175 virtual bool totalBytesKnown(); |
| 176 virtual float maxTimeBuffered() const; | 176 virtual const WebKit::WebTimeRanges& buffered() const; |
| 177 virtual float maxTimeSeekable() const; | 177 virtual float maxTimeSeekable() const; |
| 178 | 178 |
| 179 // Methods for painting. | 179 // Methods for painting. |
| 180 virtual void setSize(const WebKit::WebSize& size); | 180 virtual void setSize(const WebKit::WebSize& size); |
| 181 | 181 |
| 182 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); | 182 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); |
| 183 | 183 |
| 184 // True if the loaded media has a playable video/audio track. | 184 // True if the loaded media has a playable video/audio track. |
| 185 virtual bool hasVideo() const; | 185 virtual bool hasVideo() const; |
| 186 virtual bool hasAudio() const; | 186 virtual bool hasAudio() const; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Destroy resources held. | 238 // Destroy resources held. |
| 239 void Destroy(); | 239 void Destroy(); |
| 240 | 240 |
| 241 // Getter method to |client_|. | 241 // Getter method to |client_|. |
| 242 WebKit::WebMediaPlayerClient* GetClient(); | 242 WebKit::WebMediaPlayerClient* GetClient(); |
| 243 | 243 |
| 244 // TODO(hclam): get rid of these members and read from the pipeline directly. | 244 // TODO(hclam): get rid of these members and read from the pipeline directly. |
| 245 WebKit::WebMediaPlayer::NetworkState network_state_; | 245 WebKit::WebMediaPlayer::NetworkState network_state_; |
| 246 WebKit::WebMediaPlayer::ReadyState ready_state_; | 246 WebKit::WebMediaPlayer::ReadyState ready_state_; |
| 247 | 247 |
| 248 // Keep a list of buffered time ranges. |
| 249 WebKit::WebTimeRanges buffered_; |
| 250 |
| 248 // Message loops for posting tasks between Chrome's main thread. Also used | 251 // Message loops for posting tasks between Chrome's main thread. Also used |
| 249 // for DCHECKs so methods calls won't execute in the wrong thread. | 252 // for DCHECKs so methods calls won't execute in the wrong thread. |
| 250 MessageLoop* main_loop_; | 253 MessageLoop* main_loop_; |
| 251 | 254 |
| 252 // A collection of factories for creating filters. | 255 // A collection of factories for creating filters. |
| 253 scoped_refptr<media::FilterFactoryCollection> filter_factory_; | 256 scoped_refptr<media::FilterFactoryCollection> filter_factory_; |
| 254 | 257 |
| 255 // The actual pipeline and the thread it runs on. | 258 // The actual pipeline and the thread it runs on. |
| 256 scoped_refptr<media::PipelineImpl> pipeline_; | 259 scoped_refptr<media::PipelineImpl> pipeline_; |
| 257 base::Thread pipeline_thread_; | 260 base::Thread pipeline_thread_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 268 WebKit::WebMediaPlayerClient* client_; | 271 WebKit::WebMediaPlayerClient* client_; |
| 269 | 272 |
| 270 scoped_refptr<Proxy> proxy_; | 273 scoped_refptr<Proxy> proxy_; |
| 271 | 274 |
| 272 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 275 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 273 }; | 276 }; |
| 274 | 277 |
| 275 } // namespace webkit_glue | 278 } // namespace webkit_glue |
| 276 | 279 |
| 277 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ | 280 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |