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 15005005: Use a shared thread for media operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 WebKit::WebMediaPlayer::ReadyState ready_state_; 273 WebKit::WebMediaPlayer::ReadyState ready_state_;
274 274
275 // Keep a list of buffered time ranges. 275 // Keep a list of buffered time ranges.
276 WebKit::WebTimeRanges buffered_; 276 WebKit::WebTimeRanges buffered_;
277 277
278 // Message loops for posting tasks on Chrome's main thread. Also used 278 // Message loops for posting tasks on Chrome's main thread. Also used
279 // for DCHECKs so methods calls won't execute in the wrong thread. 279 // for DCHECKs so methods calls won't execute in the wrong thread.
280 const scoped_refptr<base::MessageLoopProxy> main_loop_; 280 const scoped_refptr<base::MessageLoopProxy> main_loop_;
281 281
282 scoped_ptr<media::Pipeline> pipeline_; 282 scoped_ptr<media::Pipeline> pipeline_;
283 base::Thread media_thread_; 283 scoped_refptr<base::MessageLoopProxy> media_loop_;
284 284
285 // The currently selected key system. Empty string means that no key system 285 // The currently selected key system. Empty string means that no key system
286 // has been selected. 286 // has been selected.
287 WebKit::WebString current_key_system_; 287 WebKit::WebString current_key_system_;
288 288
289 // Playback state. 289 // Playback state.
290 // 290 //
291 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 291 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
292 // single "playback rate" over worrying about paused/stopped etc... It forces 292 // single "playback rate" over worrying about paused/stopped etc... It forces
293 // all clients to manage the pause+playback rate externally, but is that 293 // all clients to manage the pause+playback rate externally, but is that
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // A pointer back to the compositor to inform it about state changes. This is 368 // A pointer back to the compositor to inform it about state changes. This is
369 // not NULL while the compositor is actively using this webmediaplayer. 369 // not NULL while the compositor is actively using this webmediaplayer.
370 cc::VideoFrameProvider::Client* video_frame_provider_client_; 370 cc::VideoFrameProvider::Client* video_frame_provider_client_;
371 371
372 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 372 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
373 }; 373 };
374 374
375 } // namespace webkit_media 375 } // namespace webkit_media
376 376
377 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 377 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698