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 CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" | 27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
32 | 32 |
33 class RenderAudioSourceProvider; | 33 class RenderAudioSourceProvider; |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 class WebContentDecryptionModule; | 36 class WebContentDecryptionModule; |
37 class WebContentDecryptionModuleResult; | |
37 class WebLocalFrame; | 38 class WebLocalFrame; |
38 } | 39 } |
39 | 40 |
40 namespace base { | 41 namespace base { |
41 class MessageLoopProxy; | 42 class MessageLoopProxy; |
42 } | 43 } |
43 | 44 |
44 namespace media { | 45 namespace media { |
45 class ChunkDemuxer; | 46 class ChunkDemuxer; |
46 class GpuVideoAcceleratorFactories; | 47 class GpuVideoAcceleratorFactories; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 const unsigned char* key, | 146 const unsigned char* key, |
146 unsigned key_length, | 147 unsigned key_length, |
147 const unsigned char* init_data, | 148 const unsigned char* init_data, |
148 unsigned init_data_length, | 149 unsigned init_data_length, |
149 const blink::WebString& session_id); | 150 const blink::WebString& session_id); |
150 | 151 |
151 virtual MediaKeyException cancelKeyRequest( | 152 virtual MediaKeyException cancelKeyRequest( |
152 const blink::WebString& key_system, | 153 const blink::WebString& key_system, |
153 const blink::WebString& session_id); | 154 const blink::WebString& session_id); |
154 | 155 |
156 // TODO(jrummell): Remove this method once Blink updated to use the other | |
157 // two methods. | |
155 virtual void setContentDecryptionModule( | 158 virtual void setContentDecryptionModule( |
156 blink::WebContentDecryptionModule* cdm); | 159 blink::WebContentDecryptionModule* cdm); |
160 virtual void setContentDecryptionModuleSync( | |
ddorwin
2014/08/07 19:52:04
reorder (to match my Blink comment)
jrummell
2014/08/08 20:58:28
Done.
| |
161 blink::WebContentDecryptionModule* cdm); | |
162 virtual void setContentDecryptionModule( | |
163 blink::WebContentDecryptionModule* cdm, | |
164 blink::WebContentDecryptionModuleResult result); | |
157 | 165 |
158 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status); | 166 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status); |
159 void OnPipelineEnded(); | 167 void OnPipelineEnded(); |
160 void OnPipelineError(media::PipelineStatus error); | 168 void OnPipelineError(media::PipelineStatus error); |
161 void OnPipelineMetadata(media::PipelineMetadata metadata); | 169 void OnPipelineMetadata(media::PipelineMetadata metadata); |
162 void OnPipelineBufferingStateChanged(media::BufferingState buffering_state); | 170 void OnPipelineBufferingStateChanged(media::BufferingState buffering_state); |
163 void OnDemuxerOpened(); | 171 void OnDemuxerOpened(); |
164 void OnKeyAdded(const std::string& session_id); | 172 void OnKeyAdded(const std::string& session_id); |
165 void OnKeyError(const std::string& session_id, | 173 void OnKeyError(const std::string& session_id, |
166 media::MediaKeys::KeyError error_code, | 174 media::MediaKeys::KeyError error_code, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 // Called by VideoRendererImpl on its internal thread with the new frame to be | 230 // Called by VideoRendererImpl on its internal thread with the new frame to be |
223 // painted. | 231 // painted. |
224 void FrameReady(const scoped_refptr<media::VideoFrame>& frame); | 232 void FrameReady(const scoped_refptr<media::VideoFrame>& frame); |
225 | 233 |
226 // Requests that this object notifies when a decryptor is ready through the | 234 // Requests that this object notifies when a decryptor is ready through the |
227 // |decryptor_ready_cb| provided. | 235 // |decryptor_ready_cb| provided. |
228 // If |decryptor_ready_cb| is null, the existing callback will be fired with | 236 // If |decryptor_ready_cb| is null, the existing callback will be fired with |
229 // NULL immediately and reset. | 237 // NULL immediately and reset. |
230 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); | 238 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); |
231 | 239 |
240 // Called when the ContentDecryptionModule has been attached to the | |
241 // pipeline/decoders. | |
242 void ContentDecryptionModuleAttached( | |
243 blink::WebContentDecryptionModuleResult result, | |
244 bool success); | |
245 | |
232 // Returns the current video frame from |compositor_|. Blocks until the | 246 // Returns the current video frame from |compositor_|. Blocks until the |
233 // compositor can return the frame. | 247 // compositor can return the frame. |
234 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor(); | 248 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor(); |
235 | 249 |
236 blink::WebLocalFrame* frame_; | 250 blink::WebLocalFrame* frame_; |
237 | 251 |
238 // TODO(hclam): get rid of these members and read from the pipeline directly. | 252 // TODO(hclam): get rid of these members and read from the pipeline directly. |
239 blink::WebMediaPlayer::NetworkState network_state_; | 253 blink::WebMediaPlayer::NetworkState network_state_; |
240 blink::WebMediaPlayer::ReadyState ready_state_; | 254 blink::WebMediaPlayer::ReadyState ready_state_; |
241 | 255 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 WebContentDecryptionModuleImpl* web_cdm_; | 352 WebContentDecryptionModuleImpl* web_cdm_; |
339 | 353 |
340 media::DecryptorReadyCB decryptor_ready_cb_; | 354 media::DecryptorReadyCB decryptor_ready_cb_; |
341 | 355 |
342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 356 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
343 }; | 357 }; |
344 | 358 |
345 } // namespace content | 359 } // namespace content |
346 | 360 |
347 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 361 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |