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

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

Issue 14348007: Reland: Remove reference counting from media::VideoDecoder and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 8 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
« no previous file with comments | « webkit/media/webkit_media.gypi ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // Gets the duration value reported by the pipeline. 265 // Gets the duration value reported by the pipeline.
266 double GetPipelineDuration() const; 266 double GetPipelineDuration() const;
267 267
268 // Notifies WebKit of the duration change. 268 // Notifies WebKit of the duration change.
269 void OnDurationChange(); 269 void OnDurationChange();
270 270
271 // Called by VideoRendererBase on its internal thread with the new frame to be 271 // Called by VideoRendererBase on its internal thread with the new frame to be
272 // painted. 272 // painted.
273 void FrameReady(const scoped_refptr<media::VideoFrame>& frame); 273 void FrameReady(const scoped_refptr<media::VideoFrame>& frame);
274 274
275 // Builds a FilterCollection based on the current configuration of
276 // WebMediaPlayerImpl.
277 scoped_ptr<media::FilterCollection> BuildFilterCollection();
278
275 WebKit::WebFrame* frame_; 279 WebKit::WebFrame* frame_;
276 280
277 // TODO(hclam): get rid of these members and read from the pipeline directly. 281 // TODO(hclam): get rid of these members and read from the pipeline directly.
278 WebKit::WebMediaPlayer::NetworkState network_state_; 282 WebKit::WebMediaPlayer::NetworkState network_state_;
279 WebKit::WebMediaPlayer::ReadyState ready_state_; 283 WebKit::WebMediaPlayer::ReadyState ready_state_;
280 284
281 // Keep a list of buffered time ranges. 285 // Keep a list of buffered time ranges.
282 WebKit::WebTimeRanges buffered_; 286 WebKit::WebTimeRanges buffered_;
283 287
284 // Message loops for posting tasks on Chrome's main thread. Also used 288 // Message loops for posting tasks on Chrome's main thread. Also used
285 // for DCHECKs so methods calls won't execute in the wrong thread. 289 // for DCHECKs so methods calls won't execute in the wrong thread.
286 const scoped_refptr<base::MessageLoopProxy> main_loop_; 290 const scoped_refptr<base::MessageLoopProxy> main_loop_;
287 291
288 scoped_ptr<media::FilterCollection> filter_collection_;
289 scoped_refptr<media::Pipeline> pipeline_; 292 scoped_refptr<media::Pipeline> pipeline_;
290 base::Thread media_thread_; 293 base::Thread media_thread_;
291 294
292 // The currently selected key system. Empty string means that no key system 295 // The currently selected key system. Empty string means that no key system
293 // has been selected. 296 // has been selected.
294 WebKit::WebString current_key_system_; 297 WebKit::WebString current_key_system_;
295 298
296 // Playback state. 299 // Playback state.
297 // 300 //
298 // TODO(scherkus): we have these because Pipeline favours the simplicity of a 301 // TODO(scherkus): we have these because Pipeline favours the simplicity of a
(...skipping 23 matching lines...) Expand all
322 MediaStreamClient* media_stream_client_; 325 MediaStreamClient* media_stream_client_;
323 326
324 scoped_refptr<media::MediaLog> media_log_; 327 scoped_refptr<media::MediaLog> media_log_;
325 328
326 // Since accelerated compositing status is only known after the first layout, 329 // Since accelerated compositing status is only known after the first layout,
327 // we delay reporting it to UMA until that time. 330 // we delay reporting it to UMA until that time.
328 bool accelerated_compositing_reported_; 331 bool accelerated_compositing_reported_;
329 332
330 bool incremented_externally_allocated_memory_; 333 bool incremented_externally_allocated_memory_;
331 334
335 // Factories for supporting GpuVideoDecoder. May be null.
336 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
337
332 // Routes audio playback to either AudioRendererSink or WebAudio. 338 // Routes audio playback to either AudioRendererSink or WebAudio.
333 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; 339 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
334 340
335 bool is_local_source_; 341 bool is_local_source_;
336 bool supports_save_; 342 bool supports_save_;
337 343
338 // The decryptor that manages decryption keys and decrypts encrypted frames. 344 // The decryptor that manages decryption keys and decrypts encrypted frames.
339 scoped_ptr<ProxyDecryptor> decryptor_; 345 scoped_ptr<ProxyDecryptor> decryptor_;
340 346
341 bool starting_; 347 bool starting_;
(...skipping 19 matching lines...) Expand all
361 bool pending_repaint_; 367 bool pending_repaint_;
362 368
363 // The compositor layer for displaying the video content when using composited 369 // The compositor layer for displaying the video content when using composited
364 // playback. 370 // playback.
365 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 371 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
366 372
367 // A pointer back to the compositor to inform it about state changes. This is 373 // A pointer back to the compositor to inform it about state changes. This is
368 // not NULL while the compositor is actively using this webmediaplayer. 374 // not NULL while the compositor is actively using this webmediaplayer.
369 cc::VideoFrameProvider::Client* video_frame_provider_client_; 375 cc::VideoFrameProvider::Client* video_frame_provider_client_;
370 376
371 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_;
372
373 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 377 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
374 }; 378 };
375 379
376 } // namespace webkit_media 380 } // namespace webkit_media
377 381
378 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 382 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/media/webkit_media.gypi ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698