| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); | 217 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); |
| 218 | 218 |
| 219 // Called when the demuxer encounters encrypted streams. | 219 // Called when the demuxer encounters encrypted streams. |
| 220 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, | 220 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, |
| 221 const std::vector<uint8>& init_data); | 221 const std::vector<uint8>& init_data); |
| 222 | 222 |
| 223 // Called when a decoder detects that the key needed to decrypt the stream | 223 // Called when a decoder detects that the key needed to decrypt the stream |
| 224 // is not available. | 224 // is not available. |
| 225 void OnWaitingForDecryptionKey(); | 225 void OnWaitingForDecryptionKey(); |
| 226 | 226 |
| 227 void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb); | 227 // Sets |cdm_context| on the pipeline and fires |cdm_attached_cb| when done. |
| 228 // Parameter order is reversed for easy binding. |
| 229 void SetCdm(const CdmAttachedCB& cdm_attached_cb, CdmContext* cdm_context); |
| 228 | 230 |
| 229 // Called when a CDM has been attached to the |pipeline_|. | 231 // Called when a CDM has been attached to the |pipeline_|. |
| 230 void OnCdmAttached(blink::WebContentDecryptionModuleResult result, | 232 void OnCdmAttached(blink::WebContentDecryptionModuleResult result, |
| 231 bool success); | 233 bool success); |
| 232 | 234 |
| 233 // Updates |paused_time_| to the current media time with consideration for the | 235 // Updates |paused_time_| to the current media time with consideration for the |
| 234 // |ended_| state by clamping current time to duration upon |ended_|. | 236 // |ended_| state by clamping current time to duration upon |ended_|. |
| 235 void UpdatePausedTime(); | 237 void UpdatePausedTime(); |
| 236 | 238 |
| 237 blink::WebLocalFrame* frame_; | 239 blink::WebLocalFrame* frame_; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 EncryptedMediaPlayerSupport encrypted_media_support_; | 328 EncryptedMediaPlayerSupport encrypted_media_support_; |
| 327 | 329 |
| 328 scoped_ptr<RendererFactory> renderer_factory_; | 330 scoped_ptr<RendererFactory> renderer_factory_; |
| 329 | 331 |
| 330 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 332 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 331 }; | 333 }; |
| 332 | 334 |
| 333 } // namespace media | 335 } // namespace media |
| 334 | 336 |
| 335 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 337 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |