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

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: Rebase and move client() to protected. 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void Repaint(); 225 void Repaint();
226 226
227 void OnPipelineInitialize(media::PipelineStatus status); 227 void OnPipelineInitialize(media::PipelineStatus status);
228 void OnPipelineSeek(media::PipelineStatus status); 228 void OnPipelineSeek(media::PipelineStatus status);
229 void OnPipelineEnded(media::PipelineStatus status); 229 void OnPipelineEnded(media::PipelineStatus status);
230 void OnPipelineError(media::PipelineStatus error); 230 void OnPipelineError(media::PipelineStatus error);
231 void OnDemuxerOpened(); 231 void OnDemuxerOpened();
232 void OnKeyAdded(const std::string& key_system, const std::string& session_id); 232 void OnKeyAdded(const std::string& key_system, const std::string& session_id);
233 void OnKeyError(const std::string& key_system, 233 void OnKeyError(const std::string& key_system,
234 const std::string& session_id, 234 const std::string& session_id,
235 media::AesDecryptor::KeyError error_code, 235 media::Decryptor::KeyError error_code,
236 int system_code); 236 int system_code);
237 void OnKeyMessage(const std::string& key_system, 237 void OnKeyMessage(const std::string& key_system,
238 const std::string& session_id, 238 const std::string& session_id,
239 scoped_array<uint8> message, 239 scoped_array<uint8> message,
240 int message_length, 240 int message_length,
241 const std::string& default_url); 241 const std::string& default_url);
242 void OnNeedKey(const std::string& key_system, 242 void OnNeedKey(const std::string& key_system,
243 const std::string& session_id, 243 const std::string& session_id,
244 scoped_array<uint8> init_data, 244 scoped_array<uint8> init_data,
245 int init_data_size); 245 int init_data_size);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 // The media pipeline and a bool tracking whether we have started it yet. 288 // The media pipeline and a bool tracking whether we have started it yet.
289 // 289 //
290 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and 290 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and
291 // have WebMediaPlayerImpl return the default values to WebKit instead of 291 // have WebMediaPlayerImpl return the default values to WebKit instead of
292 // relying on Pipeline to take care of default values. 292 // relying on Pipeline to take care of default values.
293 scoped_refptr<media::Pipeline> pipeline_; 293 scoped_refptr<media::Pipeline> pipeline_;
294 bool started_; 294 bool started_;
295 295
296 // The decryptor that manages decryption keys and decrypts encrypted frames. 296 // The decryptor that manages decryption keys and decrypts encrypted frames.
297 scoped_ptr<media::AesDecryptor> decryptor_; 297 scoped_ptr<media::Decryptor> decryptor_;
298 298
299 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; 299 scoped_ptr<media::MessageLoopFactory> message_loop_factory_;
300 300
301 // Playback state. 301 // Playback state.
302 // 302 //
303 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 303 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
304 // single "playback rate" over worrying about paused/stopped etc... It forces 304 // single "playback rate" over worrying about paused/stopped etc... It forces
305 // all clients to manage the pause+playback rate externally, but is that 305 // all clients to manage the pause+playback rate externally, but is that
306 // really a bad thing? 306 // really a bad thing?
307 // 307 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 WebKit::WebAudioSourceProvider* audio_source_provider_; 339 WebKit::WebAudioSourceProvider* audio_source_provider_;
340 340
341 bool is_local_source_; 341 bool is_local_source_;
342 342
343 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 343 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
344 }; 344 };
345 345
346 } // namespace webkit_media 346 } // namespace webkit_media
347 347
348 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 348 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698