| Index: media/base/audio_decoder_config.cc
|
| diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc
|
| index 213cb10edc41881a16b8e5cdb67cf0b43e685503..b0bca7b3bb42e955b749d64548752a670e33a210 100644
|
| --- a/media/base/audio_decoder_config.cc
|
| +++ b/media/base/audio_decoder_config.cc
|
| @@ -16,18 +16,18 @@ AudioDecoderConfig::AudioDecoderConfig()
|
| channel_layout_(CHANNEL_LAYOUT_UNSUPPORTED),
|
| samples_per_second_(0),
|
| bytes_per_frame_(0),
|
| - is_encrypted_(false),
|
| - codec_delay_(0) {
|
| -}
|
| + encryption_scheme_(false),
|
| + codec_delay_(0) {}
|
|
|
| -AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec,
|
| - SampleFormat sample_format,
|
| - ChannelLayout channel_layout,
|
| - int samples_per_second,
|
| - const std::vector<uint8_t>& extra_data,
|
| - bool is_encrypted) {
|
| +AudioDecoderConfig::AudioDecoderConfig(
|
| + AudioCodec codec,
|
| + SampleFormat sample_format,
|
| + ChannelLayout channel_layout,
|
| + int samples_per_second,
|
| + const std::vector<uint8_t>& extra_data,
|
| + const EncryptionScheme& encryption_scheme) {
|
| Initialize(codec, sample_format, channel_layout, samples_per_second,
|
| - extra_data, is_encrypted, base::TimeDelta(), 0);
|
| + extra_data, encryption_scheme, base::TimeDelta(), 0);
|
| }
|
|
|
| void AudioDecoderConfig::Initialize(AudioCodec codec,
|
| @@ -35,7 +35,7 @@ void AudioDecoderConfig::Initialize(AudioCodec codec,
|
| ChannelLayout channel_layout,
|
| int samples_per_second,
|
| const std::vector<uint8_t>& extra_data,
|
| - bool is_encrypted,
|
| + const EncryptionScheme& encryption_scheme,
|
| base::TimeDelta seek_preroll,
|
| int codec_delay) {
|
| codec_ = codec;
|
| @@ -44,7 +44,7 @@ void AudioDecoderConfig::Initialize(AudioCodec codec,
|
| sample_format_ = sample_format;
|
| bytes_per_channel_ = SampleFormatToBytesPerChannel(sample_format);
|
| extra_data_ = extra_data;
|
| - is_encrypted_ = is_encrypted;
|
| + encryption_scheme_ = encryption_scheme;
|
| seek_preroll_ = seek_preroll;
|
| codec_delay_ = codec_delay;
|
|
|
| @@ -72,7 +72,7 @@ bool AudioDecoderConfig::Matches(const AudioDecoderConfig& config) const {
|
| (channel_layout() == config.channel_layout()) &&
|
| (samples_per_second() == config.samples_per_second()) &&
|
| (extra_data() == config.extra_data()) &&
|
| - (is_encrypted() == config.is_encrypted()) &&
|
| + (encryption_scheme().Matches(config.encryption_scheme())) &&
|
| (sample_format() == config.sample_format()) &&
|
| (seek_preroll() == config.seek_preroll()) &&
|
| (codec_delay() == config.codec_delay()));
|
| @@ -129,4 +129,8 @@ std::string AudioDecoderConfig::GetHumanReadableCodecName() const {
|
| return "";
|
| }
|
|
|
| +bool AudioDecoderConfig::is_encrypted() const {
|
| + return encryption_scheme_.is_encrypted();
|
| +}
|
| +
|
| } // namespace media
|
|
|