Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: content/renderer/media/webmediaplayer_impl.h

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhance tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
155 virtual void setContentDecryptionModule( 156 virtual void setContentDecryptionModule(
156 blink::WebContentDecryptionModule* cdm); 157 blink::WebContentDecryptionModule* cdm);
158 virtual void setContentDecryptionModule(
159 blink::WebContentDecryptionModule* cdm,
160 blink::WebContentDecryptionModuleResult result);
157 161
158 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status); 162 void OnPipelineSeeked(bool time_changed, media::PipelineStatus status);
159 void OnPipelineEnded(); 163 void OnPipelineEnded();
160 void OnPipelineError(media::PipelineStatus error); 164 void OnPipelineError(media::PipelineStatus error);
161 void OnPipelineMetadata(media::PipelineMetadata metadata); 165 void OnPipelineMetadata(media::PipelineMetadata metadata);
162 void OnPipelineBufferingStateChanged(media::BufferingState buffering_state); 166 void OnPipelineBufferingStateChanged(media::BufferingState buffering_state);
163 void OnDemuxerOpened(); 167 void OnDemuxerOpened();
164 void OnKeyAdded(const std::string& session_id); 168 void OnKeyAdded(const std::string& session_id);
165 void OnKeyError(const std::string& session_id, 169 void OnKeyError(const std::string& session_id,
166 media::MediaKeys::KeyError error_code, 170 media::MediaKeys::KeyError error_code,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Called by VideoRendererImpl on its internal thread with the new frame to be 226 // Called by VideoRendererImpl on its internal thread with the new frame to be
223 // painted. 227 // painted.
224 void FrameReady(const scoped_refptr<media::VideoFrame>& frame); 228 void FrameReady(const scoped_refptr<media::VideoFrame>& frame);
225 229
226 // Requests that this object notifies when a decryptor is ready through the 230 // Requests that this object notifies when a decryptor is ready through the
227 // |decryptor_ready_cb| provided. 231 // |decryptor_ready_cb| provided.
228 // If |decryptor_ready_cb| is null, the existing callback will be fired with 232 // If |decryptor_ready_cb| is null, the existing callback will be fired with
229 // NULL immediately and reset. 233 // NULL immediately and reset.
230 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); 234 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb);
231 235
236 // Called when the ContentDecryptionModule has been attached to the
237 // pipeline/decoders.
238 void ContentDecryptionModuleAttached(
239 blink::WebContentDecryptionModuleResult result,
240 bool success);
241
232 // Returns the current video frame from |compositor_|. Blocks until the 242 // Returns the current video frame from |compositor_|. Blocks until the
233 // compositor can return the frame. 243 // compositor can return the frame.
234 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor(); 244 scoped_refptr<media::VideoFrame> GetCurrentFrameFromCompositor();
235 245
236 blink::WebLocalFrame* frame_; 246 blink::WebLocalFrame* frame_;
237 247
238 // TODO(hclam): get rid of these members and read from the pipeline directly. 248 // TODO(hclam): get rid of these members and read from the pipeline directly.
239 blink::WebMediaPlayer::NetworkState network_state_; 249 blink::WebMediaPlayer::NetworkState network_state_;
240 blink::WebMediaPlayer::ReadyState ready_state_; 250 blink::WebMediaPlayer::ReadyState ready_state_;
241 251
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 WebContentDecryptionModuleImpl* web_cdm_; 348 WebContentDecryptionModuleImpl* web_cdm_;
339 349
340 media::DecryptorReadyCB decryptor_ready_cb_; 350 media::DecryptorReadyCB decryptor_ready_cb_;
341 351
342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 352 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
343 }; 353 };
344 354
345 } // namespace content 355 } // namespace content
346 356
347 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 357 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_impl.cc » ('j') | content/renderer/media/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698