Chromium Code Reviews| 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 "webkit/renderer/media/webmediaplayer_impl.h" | 5 #include "webkit/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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1071 ScopedVector<media::VideoDecoder> video_decoders; | 1071 ScopedVector<media::VideoDecoder> video_decoders; |
| 1072 | 1072 |
| 1073 if (gpu_factories_.get()) { | 1073 if (gpu_factories_.get()) { |
| 1074 video_decoders.push_back(new media::GpuVideoDecoder( | 1074 video_decoders.push_back(new media::GpuVideoDecoder( |
| 1075 media_loop_, gpu_factories_)); | 1075 media_loop_, gpu_factories_)); |
| 1076 } | 1076 } |
| 1077 | 1077 |
| 1078 // TODO(phajdan.jr): Remove ifdefs when libvpx with vp9 support is released | 1078 // TODO(phajdan.jr): Remove ifdefs when libvpx with vp9 support is released |
| 1079 // (http://crbug.com/174287) . | 1079 // (http://crbug.com/174287) . |
| 1080 #if !defined(MEDIA_DISABLE_LIBVPX) | 1080 #if !defined(MEDIA_DISABLE_LIBVPX) |
| 1081 if (cmd_line->HasSwitch(switches::kEnableVp9Playback) || | 1081 video_decoders.push_back(new media::VpxVideoDecoder(media_loop_)); |
|
scherkus (not reviewing)
2013/06/12 20:06:31
OOC this will still prefer FFmpeg's ffvp8 because
Tom Finegan
2013/06/12 20:35:49
Right, VpxVideoDecoder only accepts VP8 input when
| |
| 1082 cmd_line->HasSwitch(switches::kEnableVp8AlphaPlayback)) { | |
| 1083 video_decoders.push_back(new media::VpxVideoDecoder(media_loop_)); | |
| 1084 } | |
| 1085 #endif // !defined(MEDIA_DISABLE_LIBVPX) | 1082 #endif // !defined(MEDIA_DISABLE_LIBVPX) |
| 1086 | 1083 |
| 1087 video_decoders.push_back(new media::FFmpegVideoDecoder(media_loop_)); | 1084 video_decoders.push_back(new media::FFmpegVideoDecoder(media_loop_)); |
| 1088 | 1085 |
| 1089 scoped_ptr<media::VideoRenderer> video_renderer( | 1086 scoped_ptr<media::VideoRenderer> video_renderer( |
| 1090 new media::VideoRendererBase( | 1087 new media::VideoRendererBase( |
| 1091 media_loop_, | 1088 media_loop_, |
| 1092 video_decoders.Pass(), | 1089 video_decoders.Pass(), |
| 1093 set_decryptor_ready_cb, | 1090 set_decryptor_ready_cb, |
| 1094 base::Bind(&WebMediaPlayerImpl::FrameReady, base::Unretained(this)), | 1091 base::Bind(&WebMediaPlayerImpl::FrameReady, base::Unretained(this)), |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1212 | 1209 |
| 1213 if (pending_repaint_) | 1210 if (pending_repaint_) |
| 1214 return; | 1211 return; |
| 1215 | 1212 |
| 1216 pending_repaint_ = true; | 1213 pending_repaint_ = true; |
| 1217 main_loop_->PostTask(FROM_HERE, base::Bind( | 1214 main_loop_->PostTask(FROM_HERE, base::Bind( |
| 1218 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); | 1215 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); |
| 1219 } | 1216 } |
| 1220 | 1217 |
| 1221 } // namespace webkit_media | 1218 } // namespace webkit_media |
| OLD | NEW |