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