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

Side by Side Diff: webkit/media/webmediaplayer_impl.h

Issue 10539150: Add Decryptor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
67 67
68 class RenderAudioSourceProvider; 68 class RenderAudioSourceProvider;
69 69
70 namespace WebKit { 70 namespace WebKit {
71 class WebAudioSourceProvider; 71 class WebAudioSourceProvider;
72 class WebFrame; 72 class WebFrame;
73 } 73 }
74 74
75 namespace media { 75 namespace media {
76 class AesDecryptor; 76 class Decryptor;
77 class MediaLog; 77 class MediaLog;
78 } 78 }
79 79
80 namespace webkit_media { 80 namespace webkit_media {
81 81
82 class MediaStreamClient; 82 class MediaStreamClient;
83 class WebMediaPlayerDelegate; 83 class WebMediaPlayerDelegate;
84 class WebMediaPlayerProxy; 84 class WebMediaPlayerProxy;
85 85
86 class WebMediaPlayerImpl 86 class WebMediaPlayerImpl
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 void OnPipelineInitialize(media::PipelineStatus status); 235 void OnPipelineInitialize(media::PipelineStatus status);
236 void OnPipelineSeek(media::PipelineStatus status); 236 void OnPipelineSeek(media::PipelineStatus status);
237 void OnPipelineEnded(media::PipelineStatus status); 237 void OnPipelineEnded(media::PipelineStatus status);
238 void OnPipelineError(media::PipelineStatus error); 238 void OnPipelineError(media::PipelineStatus error);
239 void OnNetworkEvent(media::NetworkEvent type); 239 void OnNetworkEvent(media::NetworkEvent type);
240 void OnDemuxerOpened(); 240 void OnDemuxerOpened();
241 void OnKeyAdded(const std::string& key_system, const std::string& session_id); 241 void OnKeyAdded(const std::string& key_system, const std::string& session_id);
242 void OnKeyError(const std::string& key_system, 242 void OnKeyError(const std::string& key_system,
243 const std::string& session_id, 243 const std::string& session_id,
244 media::AesDecryptor::KeyError error_code, 244 media::Decryptor::KeyError error_code,
245 int system_code); 245 int system_code);
246 void OnKeyMessage(const std::string& key_system, 246 void OnKeyMessage(const std::string& key_system,
247 const std::string& session_id, 247 const std::string& session_id,
248 scoped_array<uint8> message, 248 scoped_array<uint8> message,
249 int message_length, 249 int message_length,
250 const std::string& default_url); 250 const std::string& default_url);
251 void OnNeedKey(const std::string& key_system, 251 void OnNeedKey(const std::string& key_system,
252 const std::string& session_id, 252 const std::string& session_id,
253 scoped_array<uint8> init_data, 253 scoped_array<uint8> init_data,
254 int init_data_size); 254 int init_data_size);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 // The media pipeline and a bool tracking whether we have started it yet. 294 // The media pipeline and a bool tracking whether we have started it yet.
295 // 295 //
296 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and 296 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and
297 // have WebMediaPlayerImpl return the default values to WebKit instead of 297 // have WebMediaPlayerImpl return the default values to WebKit instead of
298 // relying on Pipeline to take care of default values. 298 // relying on Pipeline to take care of default values.
299 scoped_refptr<media::Pipeline> pipeline_; 299 scoped_refptr<media::Pipeline> pipeline_;
300 bool started_; 300 bool started_;
301 301
302 // The decryptor that manages decryption keys and decrypts encrypted frames. 302 // The decryptor that manages decryption keys and decrypts encrypted frames.
303 scoped_ptr<media::AesDecryptor> decryptor_; 303 scoped_ptr<media::Decryptor> decryptor_;
304 304
305 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; 305 scoped_ptr<media::MessageLoopFactory> message_loop_factory_;
306 306
307 // Playback state. 307 // Playback state.
308 // 308 //
309 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 309 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
310 // single "playback rate" over worrying about paused/stopped etc... It forces 310 // single "playback rate" over worrying about paused/stopped etc... It forces
311 // all clients to manage the pause+playback rate externally, but is that 311 // all clients to manage the pause+playback rate externally, but is that
312 // really a bad thing? 312 // really a bad thing?
313 // 313 //
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 // TODO(fischman): see TODO on bytesLoaded() above. 349 // TODO(fischman): see TODO on bytesLoaded() above.
350 mutable uint64 fake_bytes_loaded_; 350 mutable uint64 fake_bytes_loaded_;
351 351
352 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 352 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
353 }; 353 };
354 354
355 } // namespace webkit_media 355 } // namespace webkit_media
356 356
357 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 357 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698