| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 case AUDIO: { | 157 case AUDIO: { |
| 158 const AudioDecoderConfig& input_audio_config = | 158 const AudioDecoderConfig& input_audio_config = |
| 159 demuxer_stream_->audio_decoder_config(); | 159 demuxer_stream_->audio_decoder_config(); |
| 160 audio_config_.reset(new AudioDecoderConfig()); | 160 audio_config_.reset(new AudioDecoderConfig()); |
| 161 audio_config_->Initialize(input_audio_config.codec(), | 161 audio_config_->Initialize(input_audio_config.codec(), |
| 162 input_audio_config.bits_per_channel(), | 162 input_audio_config.bits_per_channel(), |
| 163 input_audio_config.channel_layout(), | 163 input_audio_config.channel_layout(), |
| 164 input_audio_config.samples_per_second(), | 164 input_audio_config.samples_per_second(), |
| 165 input_audio_config.extra_data(), | 165 input_audio_config.extra_data(), |
| 166 input_audio_config.extra_data_size(), | 166 input_audio_config.extra_data_size(), |
| 167 input_audio_config.sample_format(), |
| 167 false, // Output audio is not encrypted. | 168 false, // Output audio is not encrypted. |
| 168 false); | 169 false); |
| 169 break; | 170 break; |
| 170 } | 171 } |
| 171 | 172 |
| 172 case VIDEO: { | 173 case VIDEO: { |
| 173 const VideoDecoderConfig& input_video_config = | 174 const VideoDecoderConfig& input_video_config = |
| 174 demuxer_stream_->video_decoder_config(); | 175 demuxer_stream_->video_decoder_config(); |
| 175 video_config_.reset(new VideoDecoderConfig()); | 176 video_config_.reset(new VideoDecoderConfig()); |
| 176 video_config_->Initialize(input_video_config.codec(), | 177 video_config_->Initialize(input_video_config.codec(), |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 state_ = kIdle; | 343 state_ = kIdle; |
| 343 base::ResetAndReturn(&reset_cb_).Run(); | 344 base::ResetAndReturn(&reset_cb_).Run(); |
| 344 } | 345 } |
| 345 | 346 |
| 346 Decryptor::StreamType DecryptingDemuxerStream::GetDecryptorStreamType() const { | 347 Decryptor::StreamType DecryptingDemuxerStream::GetDecryptorStreamType() const { |
| 347 DCHECK(stream_type_ == AUDIO || stream_type_ == VIDEO); | 348 DCHECK(stream_type_ == AUDIO || stream_type_ == VIDEO); |
| 348 return stream_type_ == AUDIO ? Decryptor::kAudio : Decryptor::kVideo; | 349 return stream_type_ == AUDIO ? Decryptor::kAudio : Decryptor::kVideo; |
| 349 } | 350 } |
| 350 | 351 |
| 351 } // namespace media | 352 } // namespace media |
| OLD | NEW |