| 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/base/audio_decoder_config.h" | 5 #include "media/base/audio_decoder_config.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "media/base/limits.h" | 8 #include "media/base/limits.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec, | 63 AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec, |
| 64 SampleFormat sample_format, | 64 SampleFormat sample_format, |
| 65 ChannelLayout channel_layout, | 65 ChannelLayout channel_layout, |
| 66 int samples_per_second, | 66 int samples_per_second, |
| 67 const std::vector<uint8_t>& extra_data, | 67 const std::vector<uint8_t>& extra_data, |
| 68 bool is_encrypted) { | 68 bool is_encrypted) { |
| 69 Initialize(codec, sample_format, channel_layout, samples_per_second, | 69 Initialize(codec, sample_format, channel_layout, samples_per_second, |
| 70 extra_data, is_encrypted, base::TimeDelta(), 0); | 70 extra_data, is_encrypted, base::TimeDelta(), 0); |
| 71 } | 71 } |
| 72 | 72 |
| 73 AudioDecoderConfig::AudioDecoderConfig(const AudioDecoderConfig& other) = |
| 74 default; |
| 75 |
| 73 void AudioDecoderConfig::Initialize(AudioCodec codec, | 76 void AudioDecoderConfig::Initialize(AudioCodec codec, |
| 74 SampleFormat sample_format, | 77 SampleFormat sample_format, |
| 75 ChannelLayout channel_layout, | 78 ChannelLayout channel_layout, |
| 76 int samples_per_second, | 79 int samples_per_second, |
| 77 const std::vector<uint8_t>& extra_data, | 80 const std::vector<uint8_t>& extra_data, |
| 78 bool is_encrypted, | 81 bool is_encrypted, |
| 79 base::TimeDelta seek_preroll, | 82 base::TimeDelta seek_preroll, |
| 80 int codec_delay) { | 83 int codec_delay) { |
| 81 codec_ = codec; | 84 codec_ = codec; |
| 82 channel_layout_ = channel_layout; | 85 channel_layout_ = channel_layout; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 << " sample_format: " << sample_format() | 130 << " sample_format: " << sample_format() |
| 128 << " bytes_per_frame: " << bytes_per_frame() | 131 << " bytes_per_frame: " << bytes_per_frame() |
| 129 << " seek_preroll: " << seek_preroll().InMilliseconds() << "ms" | 132 << " seek_preroll: " << seek_preroll().InMilliseconds() << "ms" |
| 130 << " codec_delay: " << codec_delay() << " has extra data? " | 133 << " codec_delay: " << codec_delay() << " has extra data? " |
| 131 << (extra_data().empty() ? "false" : "true") << " encrypted? " | 134 << (extra_data().empty() ? "false" : "true") << " encrypted? " |
| 132 << (is_encrypted() ? "true" : "false"); | 135 << (is_encrypted() ? "true" : "false"); |
| 133 return s.str(); | 136 return s.str(); |
| 134 } | 137 } |
| 135 | 138 |
| 136 } // namespace media | 139 } // namespace media |
| OLD | NEW |