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 "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 audio_source_provider_.get(), | 1092 audio_source_provider_.get(), |
1093 audio_decoders.Pass(), | 1093 audio_decoders.Pass(), |
1094 set_decryptor_ready_cb, | 1094 set_decryptor_ready_cb, |
1095 increase_preroll_on_underflow)); | 1095 increase_preroll_on_underflow)); |
1096 filter_collection->SetAudioRenderer(audio_renderer.Pass()); | 1096 filter_collection->SetAudioRenderer(audio_renderer.Pass()); |
1097 | 1097 |
1098 // Create our video decoders and renderer. | 1098 // Create our video decoders and renderer. |
1099 ScopedVector<media::VideoDecoder> video_decoders; | 1099 ScopedVector<media::VideoDecoder> video_decoders; |
1100 | 1100 |
1101 if (gpu_factories_.get()) { | 1101 if (gpu_factories_.get()) { |
1102 video_decoders.push_back(new media::GpuVideoDecoder( | 1102 video_decoders.push_back(new media::GpuVideoDecoder(gpu_factories_)); |
1103 media_loop_, gpu_factories_)); | |
1104 } | 1103 } |
1105 | 1104 |
1106 // TODO(phajdan.jr): Remove ifdefs when libvpx with vp9 support is released | 1105 // TODO(phajdan.jr): Remove ifdefs when libvpx with vp9 support is released |
1107 // (http://crbug.com/174287) . | 1106 // (http://crbug.com/174287) . |
1108 #if !defined(MEDIA_DISABLE_LIBVPX) | 1107 #if !defined(MEDIA_DISABLE_LIBVPX) |
1109 video_decoders.push_back(new media::VpxVideoDecoder(media_loop_)); | 1108 video_decoders.push_back(new media::VpxVideoDecoder(media_loop_)); |
1110 #endif // !defined(MEDIA_DISABLE_LIBVPX) | 1109 #endif // !defined(MEDIA_DISABLE_LIBVPX) |
1111 | 1110 |
1112 video_decoders.push_back(new media::FFmpegVideoDecoder(media_loop_)); | 1111 video_decoders.push_back(new media::FFmpegVideoDecoder(media_loop_)); |
1113 | 1112 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 | 1236 |
1238 if (pending_repaint_) | 1237 if (pending_repaint_) |
1239 return; | 1238 return; |
1240 | 1239 |
1241 pending_repaint_ = true; | 1240 pending_repaint_ = true; |
1242 main_loop_->PostTask(FROM_HERE, base::Bind( | 1241 main_loop_->PostTask(FROM_HERE, base::Bind( |
1243 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1242 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
1244 } | 1243 } |
1245 | 1244 |
1246 } // namespace content | 1245 } // namespace content |
OLD | NEW |