| 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 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 scoped_ptr<media::FilterCollection> filter_collection( | 1163 scoped_ptr<media::FilterCollection> filter_collection( |
| 1164 new media::FilterCollection()); | 1164 new media::FilterCollection()); |
| 1165 filter_collection->SetDemuxer(demuxer_.get()); | 1165 filter_collection->SetDemuxer(demuxer_.get()); |
| 1166 | 1166 |
| 1167 media::SetDecryptorReadyCB set_decryptor_ready_cb = | 1167 media::SetDecryptorReadyCB set_decryptor_ready_cb = |
| 1168 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::SetDecryptorReadyCB); | 1168 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::SetDecryptorReadyCB); |
| 1169 | 1169 |
| 1170 // Create our audio decoders and renderer. | 1170 // Create our audio decoders and renderer. |
| 1171 ScopedVector<media::AudioDecoder> audio_decoders; | 1171 ScopedVector<media::AudioDecoder> audio_decoders; |
| 1172 audio_decoders.push_back(new media::FFmpegAudioDecoder(media_loop_)); | 1172 audio_decoders.push_back(new media::FFmpegAudioDecoder(media_loop_)); |
| 1173 if (!cmd_line->HasSwitch(switches::kDisableOpusPlayback)) { | 1173 audio_decoders.push_back(new media::OpusAudioDecoder(media_loop_)); |
| 1174 audio_decoders.push_back(new media::OpusAudioDecoder(media_loop_)); | |
| 1175 } | |
| 1176 | 1174 |
| 1177 scoped_ptr<media::AudioRenderer> audio_renderer( | 1175 scoped_ptr<media::AudioRenderer> audio_renderer( |
| 1178 new media::AudioRendererImpl(media_loop_, | 1176 new media::AudioRendererImpl(media_loop_, |
| 1179 audio_source_provider_.get(), | 1177 audio_source_provider_.get(), |
| 1180 audio_decoders.Pass(), | 1178 audio_decoders.Pass(), |
| 1181 set_decryptor_ready_cb)); | 1179 set_decryptor_ready_cb)); |
| 1182 filter_collection->SetAudioRenderer(audio_renderer.Pass()); | 1180 filter_collection->SetAudioRenderer(audio_renderer.Pass()); |
| 1183 | 1181 |
| 1184 // Create our video decoders and renderer. | 1182 // Create our video decoders and renderer. |
| 1185 ScopedVector<media::VideoDecoder> video_decoders; | 1183 ScopedVector<media::VideoDecoder> video_decoders; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 | 1322 |
| 1325 if (web_cdm_) { | 1323 if (web_cdm_) { |
| 1326 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
| 1327 return; | 1325 return; |
| 1328 } | 1326 } |
| 1329 | 1327 |
| 1330 decryptor_ready_cb_ = decryptor_ready_cb; | 1328 decryptor_ready_cb_ = decryptor_ready_cb; |
| 1331 } | 1329 } |
| 1332 | 1330 |
| 1333 } // namespace content | 1331 } // namespace content |
| OLD | NEW |