OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/filters/decrypting_demuxer_stream.h" | 5 #include "media/filters/decrypting_demuxer_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // The decoder selector or upstream demuxer make sure the stream is valid and | 320 // The decoder selector or upstream demuxer make sure the stream is valid and |
321 // potentially encrypted. | 321 // potentially encrypted. |
322 DCHECK(IsStreamValidAndEncrypted(stream)); | 322 DCHECK(IsStreamValidAndEncrypted(stream)); |
323 | 323 |
324 switch (stream_type_) { | 324 switch (stream_type_) { |
325 case AUDIO: { | 325 case AUDIO: { |
326 const AudioDecoderConfig& input_audio_config = | 326 const AudioDecoderConfig& input_audio_config = |
327 stream->audio_decoder_config(); | 327 stream->audio_decoder_config(); |
328 audio_config_.reset(new AudioDecoderConfig()); | 328 audio_config_.reset(new AudioDecoderConfig()); |
329 audio_config_->Initialize(input_audio_config.codec(), | 329 audio_config_->Initialize(input_audio_config.codec(), |
330 input_audio_config.bits_per_channel(), | 330 input_audio_config.sample_format(), |
331 input_audio_config.channel_layout(), | 331 input_audio_config.channel_layout(), |
332 input_audio_config.samples_per_second(), | 332 input_audio_config.samples_per_second(), |
333 input_audio_config.extra_data(), | 333 input_audio_config.extra_data(), |
334 input_audio_config.extra_data_size(), | 334 input_audio_config.extra_data_size(), |
335 false, // Output audio is not encrypted. | 335 false, // Output audio is not encrypted. |
336 false); | 336 false); |
337 break; | 337 break; |
338 } | 338 } |
339 | 339 |
340 case VIDEO: { | 340 case VIDEO: { |
(...skipping 13 matching lines...) Expand all Loading... |
354 break; | 354 break; |
355 } | 355 } |
356 | 356 |
357 default: | 357 default: |
358 NOTREACHED(); | 358 NOTREACHED(); |
359 return; | 359 return; |
360 } | 360 } |
361 } | 361 } |
362 | 362 |
363 } // namespace media | 363 } // namespace media |
OLD | NEW |