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

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

Issue 10575026: Add ProxyDecryptor which wraps concrete Decryptor implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revise on comments. 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 class WebFrame; 72 class WebFrame;
73 } 73 }
74 74
75 namespace media { 75 namespace media {
76 class MediaLog; 76 class MediaLog;
77 } 77 }
78 78
79 namespace webkit_media { 79 namespace webkit_media {
80 80
81 class MediaStreamClient; 81 class MediaStreamClient;
82 class ProxyDecryptor;
82 class WebMediaPlayerDelegate; 83 class WebMediaPlayerDelegate;
83 class WebMediaPlayerProxy; 84 class WebMediaPlayerProxy;
84 85
85 class WebMediaPlayerImpl 86 class WebMediaPlayerImpl
86 : public WebKit::WebMediaPlayer, 87 : public WebKit::WebMediaPlayer,
87 public MessageLoop::DestructionObserver, 88 public MessageLoop::DestructionObserver,
88 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 89 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
89 public: 90 public:
90 // Construct a WebMediaPlayerImpl with reference to the client, and media 91 // Construct a WebMediaPlayerImpl with reference to the client, and media
91 // filter collection. By providing the filter collection the implementor can 92 // filter collection. By providing the filter collection the implementor can
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 // 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.
288 // 289 //
289 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and 290 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and
290 // have WebMediaPlayerImpl return the default values to WebKit instead of 291 // have WebMediaPlayerImpl return the default values to WebKit instead of
291 // relying on Pipeline to take care of default values. 292 // relying on Pipeline to take care of default values.
292 scoped_refptr<media::Pipeline> pipeline_; 293 scoped_refptr<media::Pipeline> pipeline_;
293 bool started_; 294 bool started_;
294 295
295 // The decryptor that manages decryption keys and decrypts encrypted frames. 296 // The decryptor that manages decryption keys and decrypts encrypted frames.
296 scoped_ptr<media::Decryptor> decryptor_; 297 scoped_ptr<webkit_media::ProxyDecryptor> decryptor_;
ddorwin 2012/06/27 04:00:08 This could just be a member - just initialize it i
xhwang 2012/06/27 21:41:26 Done.
298
299 // The currently selected key system. Empty string means that no key system
300 // has been selected.
301 WebKit::WebString current_key_system_;
297 302
298 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; 303 scoped_ptr<media::MessageLoopFactory> message_loop_factory_;
299 304
300 // Playback state. 305 // Playback state.
301 // 306 //
302 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 307 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
303 // single "playback rate" over worrying about paused/stopped etc... It forces 308 // single "playback rate" over worrying about paused/stopped etc... It forces
304 // all clients to manage the pause+playback rate externally, but is that 309 // all clients to manage the pause+playback rate externally, but is that
305 // really a bad thing? 310 // really a bad thing?
306 // 311 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 WebKit::WebAudioSourceProvider* audio_source_provider_; 343 WebKit::WebAudioSourceProvider* audio_source_provider_;
339 344
340 bool is_local_source_; 345 bool is_local_source_;
341 346
342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 347 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
343 }; 348 };
344 349
345 } // namespace webkit_media 350 } // namespace webkit_media
346 351
347 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 352 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698