| Index: media/base/audio_decoder_config.cc
|
| diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc
|
| index 253c82b147c96b0304ce49d83ec7c4334bb78fdb..225f19a7f796c34c42c31e2dfcf78dd11f8181d5 100644
|
| --- a/media/base/audio_decoder_config.cc
|
| +++ b/media/base/audio_decoder_config.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "media/base/limits.h"
|
| +#include "media/base/media_util.h"
|
|
|
| namespace media {
|
|
|
| @@ -95,4 +96,19 @@ std::string AudioDecoderConfig::AsHumanReadableString() const {
|
| return s.str();
|
| }
|
|
|
| +void AudioDecoderConfig::SetIsEncrypted(bool is_encrypted) {
|
| + if (!is_encrypted) {
|
| + DCHECK(encryption_scheme_.is_encrypted()) << "Config is already clear.";
|
| + encryption_scheme_ = Unencrypted();
|
| + } else {
|
| + DCHECK(!encryption_scheme_.is_encrypted())
|
| + << "Config is already encrypted.";
|
| + // TODO(xhwang): This is only used to guide decoder selection, so set
|
| + // a common encryption scheme that should be supported by all decrypting
|
| + // decoders. We should be able to remove this when we support switching
|
| + // decoders at run time. See http://crbug.com/695595
|
| + encryption_scheme_ = AesCtrEncryptionScheme();
|
| + }
|
| +}
|
| +
|
| } // namespace media
|
|
|