Chromium Code Reviews| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 void OnOpacityChanged(bool opaque); | 202 void OnOpacityChanged(bool opaque); |
| 203 | 203 |
| 204 // Called by VideoRendererImpl on its internal thread with the new frame to be | 204 // Called by VideoRendererImpl on its internal thread with the new frame to be |
| 205 // painted. | 205 // painted. |
| 206 void FrameReady(const scoped_refptr<VideoFrame>& frame); | 206 void FrameReady(const scoped_refptr<VideoFrame>& frame); |
| 207 | 207 |
| 208 // Returns the current video frame from |compositor_|. Blocks until the | 208 // Returns the current video frame from |compositor_|. Blocks until the |
| 209 // compositor can return the frame. | 209 // compositor can return the frame. |
| 210 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); | 210 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); |
| 211 | 211 |
| 212 // Called when the demuxer encounters encrypted streams. | |
| 213 void OnNeedKey(const std::string& type, | |
| 214 const std::vector<uint8>& init_data); | |
| 215 | |
| 212 void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb); | 216 void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb); |
| 213 | 217 |
| 214 // Called when a CDM has been attached to the |pipeline_|. | 218 // Called when a CDM has been attached to the |pipeline_|. |
| 215 void OnCdmAttached(blink::WebContentDecryptionModuleResult result, | 219 void OnCdmAttached(blink::WebContentDecryptionModuleResult result, |
| 216 bool success); | 220 bool success); |
| 217 | 221 |
| 218 blink::WebLocalFrame* frame_; | 222 blink::WebLocalFrame* frame_; |
| 219 | 223 |
| 220 // TODO(hclam): get rid of these members and read from the pipeline directly. | 224 // TODO(hclam): get rid of these members and read from the pipeline directly. |
| 221 blink::WebMediaPlayer::NetworkState network_state_; | 225 blink::WebMediaPlayer::NetworkState network_state_; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 | 308 |
| 305 // The compositor layer for displaying the video content when using composited | 309 // The compositor layer for displaying the video content when using composited |
| 306 // playback. | 310 // playback. |
| 307 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; | 311 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; |
| 308 | 312 |
| 309 // Text track objects get a unique index value when they're created. | 313 // Text track objects get a unique index value when they're created. |
| 310 int text_track_index_; | 314 int text_track_index_; |
| 311 | 315 |
| 312 EncryptedMediaPlayerSupport encrypted_media_support_; | 316 EncryptedMediaPlayerSupport encrypted_media_support_; |
| 313 | 317 |
| 318 // Temporary for EME v0.1. In the future the init data type should be passed | |
|
ddorwin
2014/12/02 20:49:49
Future? Isn't this already implemented? Can we dro
xhwang
2014/12/02 21:57:47
Done.
| |
| 319 // directly from WebKit. | |
| 320 std::string init_data_type_; | |
|
ddorwin
2014/12/02 20:49:49
Let's name it prefixed_eme_... or something like t
xhwang
2014/12/02 21:57:47
Not needed since init_data_type_ is moved back to
| |
| 321 | |
| 314 const AudioHardwareConfig& audio_hardware_config_; | 322 const AudioHardwareConfig& audio_hardware_config_; |
| 315 | 323 |
| 316 scoped_ptr<Renderer> renderer_; | 324 scoped_ptr<Renderer> renderer_; |
| 317 | 325 |
| 318 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 326 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 319 }; | 327 }; |
| 320 | 328 |
| 321 } // namespace media | 329 } // namespace media |
| 322 | 330 |
| 323 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 331 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |