summaryrefslogtreecommitdiffstats
path: root/webkit/media/crypto/ppapi/clear_key_cdm.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-06 12:35:21 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-06 12:35:21 +0000
commit19e3c28a7d524d5719bbe87c0de4fd7ff76e3e51 (patch)
treeed52c99809caee3a6b13522d55c6329b67ab1380 /webkit/media/crypto/ppapi/clear_key_cdm.cc
parent2a6f6898365f74ccdd7a9d14c1e2ee8022025c0b (diff)
downloadchromium_src-19e3c28a7d524d5719bbe87c0de4fd7ff76e3e51.zip
chromium_src-19e3c28a7d524d5719bbe87c0de4fd7ff76e3e51.tar.gz
chromium_src-19e3c28a7d524d5719bbe87c0de4fd7ff76e3e51.tar.bz2
Add video decoding support in the CDM interface.
BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10900007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/crypto/ppapi/clear_key_cdm.cc')
-rw-r--r--webkit/media/crypto/ppapi/clear_key_cdm.cc29
1 files changed, 25 insertions, 4 deletions
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index 835d062..94addb4 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -137,7 +137,7 @@ cdm::Status ClearKeyCdm::GenerateKeyRequest(const uint8_t* init_data,
decryptor_.GenerateKeyRequest("", init_data, init_data_size);
if (client_.status() != Client::kKeyMessage)
- return cdm::kErrorUnknown;
+ return cdm::kError;
DCHECK(key_request);
key_request->session_id = AllocateAndCopy(client_.session_id().data(),
@@ -165,7 +165,7 @@ cdm::Status ClearKeyCdm::AddKey(const char* session_id,
std::string(session_id, session_id_size));
if (client_.status() != Client::kKeyAdded)
- return cdm::kErrorUnknown;
+ return cdm::kError;
return cdm::kSuccess;
}
@@ -203,10 +203,10 @@ cdm::Status ClearKeyCdm::Decrypt(
base::Bind(&CopyDecryptResults, &status, &buffer));
if (status == media::Decryptor::kError)
- return cdm::kErrorUnknown;
+ return cdm::kError;
if (status == media::Decryptor::kNoKey)
- return cdm::kErrorNoKey;
+ return cdm::kNoKey;
DCHECK(buffer);
int data_size = buffer->GetDataSize();
@@ -216,4 +216,25 @@ cdm::Status ClearKeyCdm::Decrypt(
return cdm::kSuccess;
}
+cdm::Status ClearKeyCdm::InitializeVideoDecoder(
+ const cdm::VideoDecoderConfig& video_decoder_config) {
+ NOTIMPLEMENTED();
+ return cdm::kError;
+}
+
+cdm::Status ClearKeyCdm::DecryptAndDecodeVideo(
+ const cdm::InputBuffer& encrypted_buffer,
+ cdm::VideoFrame* video_frame) {
+ NOTIMPLEMENTED();
+ return cdm::kError;
+}
+
+void ClearKeyCdm::ResetVideoDecoder() {
+ NOTIMPLEMENTED();
+}
+
+void ClearKeyCdm::StopVideoDecoder() {
+ NOTIMPLEMENTED();
+}
+
} // namespace webkit_media