Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Unified Diff: media/mojo/interfaces/decryptor.mojom

Issue 763883006: Add Mojo CDM Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mojo/interfaces/decryptor.mojom
diff --git a/media/mojo/interfaces/decryptor.mojom b/media/mojo/interfaces/decryptor.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..be0fe18dfed39b698f42c252d2bcaa2ec70e94a4
--- /dev/null
+++ b/media/mojo/interfaces/decryptor.mojom
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo;
+
+import "media/mojo/interfaces/demuxer_stream.mojom";
+import "media/mojo/interfaces/media_types.mojom";
+
+// TODO(xhwang): Add mojo types for AudioBuffer and VideoFrame.
+struct AudioBuffer {};
+struct VideoFrame {};
+
+[Client=DecryptorClient]
+interface Decryptor {
xhwang 2014/12/02 22:22:45 This is not implemented yet. I'll do that in later
+ enum Status {
+ SUCCESS, // Decryption successfully completed. Decrypted buffer ready.
+ NO_KEY, // No key is available to decrypt.
+ NEED_MORE_DATA, // Decoder needs more data to produce an output.
+ ERROR // Key is available but an error occurred during decryption.
+ };
+
+ // TODO(xhwang): Add comments!
+ Decrypt(DemuxerStream.Type stream_type, MediaDecoderBuffer encrypted)
+ => (Status status, MediaDecoderBuffer? buffer);
+
+ CancelDecrypt(DemuxerStream.Type stream_type);
+
+ InitializeAudioDecoder(AudioDecoderConfig config) => (bool success);
+
+ InitializeVideoDecoder(VideoDecoderConfig config) => (bool success);
+
+ DecryptAndDecodeAudio(MediaDecoderBuffer encrypted)
+ => (Status status, array<AudioBuffer>? audio_buffers);
+
+ DecryptAndDecodeVideo(
+ MediaDecoderBuffer encrypted) => (Status status, VideoFrame? video_frame);
+
+ ResetDecoder(DemuxerStream.Type stream_type);
+
+ DeinitializeDecoder(DemuxerStream.Type stream_type);
+};
+
+interface DecryptorClient {
+ OnNewUsableKey();
+};

Powered by Google App Engine
This is Rietveld 408576698