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

Side by Side Diff: media/mojo/interfaces/decryptor.mojom

Issue 2411573002: media: Use new wrapper types for media mojo interfaces (Closed)
Patch Set: comments addressed Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module media.mojom; 5 module media.mojom;
6 6
7 import "media/mojo/interfaces/demuxer_stream.mojom"; 7 import "media/mojo/interfaces/demuxer_stream.mojom";
8 import "media/mojo/interfaces/media_types.mojom"; 8 import "media/mojo/interfaces/media_types.mojom";
9 9
10 // Interface for decrypting (and decoding) encrypted streams. 10 // Interface for decrypting (and decoding) encrypted streams.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // the decrypted |audio_buffers| or |video_frame|. 47 // the decrypted |audio_buffers| or |video_frame|.
48 // At end-of-stream, this method should be called repeatedly with 48 // At end-of-stream, this method should be called repeatedly with
49 // end-of-stream |encrypted| until no buffer/frame can be produced. 49 // end-of-stream |encrypted| until no buffer/frame can be produced.
50 // These methods can only be called after the corresponding decoder has 50 // These methods can only be called after the corresponding decoder has
51 // been successfully initialized. 51 // been successfully initialized.
52 // At most one decrypt-and-decode call is allowed at any time for a 52 // At most one decrypt-and-decode call is allowed at any time for a
53 // |stream_type|. 53 // |stream_type|.
54 // For video, ReleaseSharedBuffer() must be called when the VideoFrame 54 // For video, ReleaseSharedBuffer() must be called when the VideoFrame
55 // is shared memory based and the memory is no longer needed. 55 // is shared memory based and the memory is no longer needed.
56 DecryptAndDecodeAudio(DecoderBuffer encrypted) 56 DecryptAndDecodeAudio(DecoderBuffer encrypted)
57 => (Status status, array<AudioBuffer>? audio_buffers); 57 => (Status status, array<AudioBuffer> audio_buffers);
58 DecryptAndDecodeVideo(DecoderBuffer encrypted) 58 DecryptAndDecodeVideo(DecoderBuffer encrypted)
59 => (Status status, VideoFrame? video_frame); 59 => (Status status, VideoFrame? video_frame);
60 60
61 // Resets the decoder for |stream_type| to a clean initialized state and 61 // Resets the decoder for |stream_type| to a clean initialized state and
62 // cancels any pending decrypt-and-decode operations immediately with ERROR. 62 // cancels any pending decrypt-and-decode operations immediately with ERROR.
63 // This method can only be called after the corresponding decoder has been 63 // This method can only be called after the corresponding decoder has been
64 // successfully initialized. 64 // successfully initialized.
65 ResetDecoder(DemuxerStream.Type stream_type); 65 ResetDecoder(DemuxerStream.Type stream_type);
66 66
67 // Releases decoder resources, deinitializes the decoder, aborts any pending 67 // Releases decoder resources, deinitializes the decoder, aborts any pending
68 // initialization (with false) or decrypt-and-decode (with ERROR) for 68 // initialization (with false) or decrypt-and-decode (with ERROR) for
69 // |stream_type| immediately. 69 // |stream_type| immediately.
70 // This method can be called any time after Initialize{Audio|Video}Decoder() 70 // This method can be called any time after Initialize{Audio|Video}Decoder()
71 // has been called (with the correct stream type). 71 // has been called (with the correct stream type).
72 // After this operation, the decoder is set to an uninitialized state. 72 // After this operation, the decoder is set to an uninitialized state.
73 // The decoder can be reinitialized after it is deinitialized. 73 // The decoder can be reinitialized after it is deinitialized.
74 DeinitializeDecoder(DemuxerStream.Type stream_type); 74 DeinitializeDecoder(DemuxerStream.Type stream_type);
75 75
76 // Releases the shared memory. 76 // Releases the shared memory.
77 ReleaseSharedBuffer(handle<shared_buffer> buffer, uint64 buffer_size); 77 ReleaseSharedBuffer(handle<shared_buffer> buffer, uint64 buffer_size);
78 }; 78 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/content_decryption_module.mojom ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698