summaryrefslogtreecommitdiffstats
path: root/media/cdm/aes_decryptor.cc
diff options
context:
space:
mode:
authorjrummell <jrummell@chromium.org>2015-06-01 17:46:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 00:47:45 +0000
commit7f3b0234b1c5b620c25de77403105ffe2446a8ad (patch)
treece1953840b2ee2d3f2200f4fee66118ed2a6b641 /media/cdm/aes_decryptor.cc
parent740b2ff5e2da9041c3d3e80cb612c82e27d15300 (diff)
downloadchromium_src-7f3b0234b1c5b620c25de77403105ffe2446a8ad.zip
chromium_src-7f3b0234b1c5b620c25de77403105ffe2446a8ad.tar.gz
chromium_src-7f3b0234b1c5b620c25de77403105ffe2446a8ad.tar.bz2
cenc_utils should only be included when support of MP4 is available
Change users of the methods to not call them unless MP4 support is included. TEST=EME tests run BUG= Review URL: https://codereview.chromium.org/1159153002 Cr-Commit-Position: refs/heads/master@{#332273}
Diffstat (limited to 'media/cdm/aes_decryptor.cc')
-rw-r--r--media/cdm/aes_decryptor.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/media/cdm/aes_decryptor.cc b/media/cdm/aes_decryptor.cc
index 77783e3..c145b00 100644
--- a/media/cdm/aes_decryptor.cc
+++ b/media/cdm/aes_decryptor.cc
@@ -19,9 +19,12 @@
#include "media/base/decrypt_config.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
-#include "media/cdm/cenc_utils.h"
#include "media/cdm/json_web_key.h"
+#if defined(USE_PROPRIETARY_CODECS)
+#include "media/cdm/cenc_utils.h"
+#endif
+
namespace media {
// Keeps track of the session IDs and DecryptionKeys. The keys are ordered by
@@ -271,6 +274,7 @@ void AesDecryptor::CreateSessionAndGenerateRequest(
keys.push_back(init_data);
break;
case EmeInitDataType::CENC:
+#if defined(USE_PROPRIETARY_CODECS)
// |init_data| is a set of 0 or more concatenated 'pssh' boxes.
if (!GetKeyIdsForCommonSystemId(init_data, &keys)) {
promise->reject(NOT_SUPPORTED_ERROR, 0,
@@ -278,6 +282,11 @@ void AesDecryptor::CreateSessionAndGenerateRequest(
return;
}
break;
+#else
+ promise->reject(NOT_SUPPORTED_ERROR, 0,
+ "Initialization data type CENC is not supported.");
+ return;
+#endif
case EmeInitDataType::KEYIDS: {
std::string init_data_string(init_data.begin(), init_data.end());
std::string error_message;