OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 scoped_ptr<VideoRenderer> video_renderer(new VideoRendererImpl( | 872 scoped_ptr<VideoRenderer> video_renderer(new VideoRendererImpl( |
873 media_task_runner_, | 873 media_task_runner_, |
874 video_decoders.Pass(), | 874 video_decoders.Pass(), |
875 set_decryptor_ready_cb, | 875 set_decryptor_ready_cb, |
876 base::Bind(&WebMediaPlayerImpl::FrameReady, base::Unretained(this)), | 876 base::Bind(&WebMediaPlayerImpl::FrameReady, base::Unretained(this)), |
877 true, | 877 true, |
878 media_log_)); | 878 media_log_)); |
879 | 879 |
880 // Create renderer. | 880 // Create renderer. |
881 return scoped_ptr<Renderer>(new RendererImpl( | 881 return scoped_ptr<Renderer>(new RendererImpl( |
882 media_task_runner_, | 882 media_task_runner_, audio_renderer.Pass(), video_renderer.Pass())); |
883 demuxer_.get(), | |
884 audio_renderer.Pass(), | |
885 video_renderer.Pass())); | |
886 } | 883 } |
887 | 884 |
888 void WebMediaPlayerImpl::StartPipeline() { | 885 void WebMediaPlayerImpl::StartPipeline() { |
889 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 886 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
890 | 887 |
891 // Keep track if this is a MSE or non-MSE playback. | 888 // Keep track if this is a MSE or non-MSE playback. |
892 UMA_HISTOGRAM_BOOLEAN("Media.MSE.Playback", | 889 UMA_HISTOGRAM_BOOLEAN("Media.MSE.Playback", |
893 (load_type_ == LoadTypeMediaSource)); | 890 (load_type_ == LoadTypeMediaSource)); |
894 | 891 |
895 LogCB mse_log_cb; | 892 LogCB mse_log_cb; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 compositor_task_runner_->PostTask(FROM_HERE, | 1026 compositor_task_runner_->PostTask(FROM_HERE, |
1030 base::Bind(&GetCurrentFrameAndSignal, | 1027 base::Bind(&GetCurrentFrameAndSignal, |
1031 base::Unretained(compositor_), | 1028 base::Unretained(compositor_), |
1032 &video_frame, | 1029 &video_frame, |
1033 &event)); | 1030 &event)); |
1034 event.Wait(); | 1031 event.Wait(); |
1035 return video_frame; | 1032 return video_frame; |
1036 } | 1033 } |
1037 | 1034 |
1038 } // namespace media | 1035 } // namespace media |
OLD | NEW |