| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Pipeline which is the actual media player pipeline, it glues | 6 // It contains Pipeline 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 // Pipeline would creates multiple threads and access some public methods | 8 // Pipeline 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 virtual unsigned videoDecodedByteCount() const; | 177 virtual unsigned videoDecodedByteCount() const; |
| 178 | 178 |
| 179 virtual WebKit::WebVideoFrame* getCurrentFrame(); | 179 virtual WebKit::WebVideoFrame* getCurrentFrame(); |
| 180 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); | 180 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); |
| 181 | 181 |
| 182 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); | 182 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); |
| 183 | 183 |
| 184 virtual bool sourceAppend(const unsigned char* data, unsigned length); | 184 virtual bool sourceAppend(const unsigned char* data, unsigned length); |
| 185 virtual void sourceEndOfStream(EndOfStreamStatus status); | 185 virtual void sourceEndOfStream(EndOfStreamStatus status); |
| 186 | 186 |
| 187 virtual MediaKeyException generateKeyRequest( |
| 188 const WebKit::WebString& key_system, |
| 189 const unsigned char* init_data, |
| 190 unsigned init_data_length); |
| 191 |
| 192 virtual MediaKeyException addKey(const WebKit::WebString& key_system, |
| 193 const unsigned char* key, |
| 194 unsigned key_length, |
| 195 const unsigned char* init_data, |
| 196 unsigned init_data_length, |
| 197 const WebKit::WebString& session_id); |
| 198 |
| 199 virtual MediaKeyException cancelKeyRequest( |
| 200 const WebKit::WebString& key_system, |
| 201 const WebKit::WebString& session_id); |
| 202 |
| 203 |
| 187 // As we are closing the tab or even the browser, |main_loop_| is destroyed | 204 // As we are closing the tab or even the browser, |main_loop_| is destroyed |
| 188 // even before this object gets destructed, so we need to know when | 205 // even before this object gets destructed, so we need to know when |
| 189 // |main_loop_| is being destroyed and we can stop posting repaint task | 206 // |main_loop_| is being destroyed and we can stop posting repaint task |
| 190 // to it. | 207 // to it. |
| 191 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; | 208 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; |
| 192 | 209 |
| 193 void Repaint(); | 210 void Repaint(); |
| 194 | 211 |
| 195 void OnPipelineInitialize(media::PipelineStatus status); | 212 void OnPipelineInitialize(media::PipelineStatus status); |
| 196 void OnPipelineSeek(media::PipelineStatus status); | 213 void OnPipelineSeek(media::PipelineStatus status); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 214 | 231 |
| 215 // Destroy resources held. | 232 // Destroy resources held. |
| 216 void Destroy(); | 233 void Destroy(); |
| 217 | 234 |
| 218 // Getter method to |client_|. | 235 // Getter method to |client_|. |
| 219 WebKit::WebMediaPlayerClient* GetClient(); | 236 WebKit::WebMediaPlayerClient* GetClient(); |
| 220 | 237 |
| 221 // Lets V8 know that player uses extra resources not managed by V8. | 238 // Lets V8 know that player uses extra resources not managed by V8. |
| 222 void IncrementExternallyAllocatedMemory(); | 239 void IncrementExternallyAllocatedMemory(); |
| 223 | 240 |
| 241 void generateKeyRequestTask(const WebKit::WebString& key_system, |
| 242 const unsigned char* init_data, |
| 243 unsigned init_data_length); |
| 244 |
| 245 void addKeyTask(const WebKit::WebString& key_system, |
| 246 const unsigned char* key, |
| 247 unsigned key_length, |
| 248 const unsigned char* init_data, |
| 249 unsigned init_data_length, |
| 250 const WebKit::WebString& session_id); |
| 251 |
| 224 WebKit::WebFrame* frame_; | 252 WebKit::WebFrame* frame_; |
| 225 | 253 |
| 226 // TODO(hclam): get rid of these members and read from the pipeline directly. | 254 // TODO(hclam): get rid of these members and read from the pipeline directly. |
| 227 WebKit::WebMediaPlayer::NetworkState network_state_; | 255 WebKit::WebMediaPlayer::NetworkState network_state_; |
| 228 WebKit::WebMediaPlayer::ReadyState ready_state_; | 256 WebKit::WebMediaPlayer::ReadyState ready_state_; |
| 229 | 257 |
| 230 // Keep a list of buffered time ranges. | 258 // Keep a list of buffered time ranges. |
| 231 WebKit::WebTimeRanges buffered_; | 259 WebKit::WebTimeRanges buffered_; |
| 232 | 260 |
| 233 // Message loops for posting tasks between Chrome's main thread. Also used | 261 // Message loops for posting tasks between Chrome's main thread. Also used |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 bool incremented_externally_allocated_memory_; | 318 bool incremented_externally_allocated_memory_; |
| 291 | 319 |
| 292 WebKit::WebAudioSourceProvider* audio_source_provider_; | 320 WebKit::WebAudioSourceProvider* audio_source_provider_; |
| 293 | 321 |
| 294 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 322 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 295 }; | 323 }; |
| 296 | 324 |
| 297 } // namespace webkit_media | 325 } // namespace webkit_media |
| 298 | 326 |
| 299 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 327 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |