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

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

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CHECKs on GPU side. Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/media_types.mojom"; 7 import "media/mojo/interfaces/media_types.mojom";
8 8
9 interface AudioDecoder { 9 interface AudioDecoder {
10 // Status of a decode operation. See media::AudioDecoder for description.
11 enum DecodeStatus {
12 OK, // We're all good.
13 ABORTED, // We aborted as a result of Reset() or destruction.
14 DECODE_ERROR, // A decoding error occurred.
15 };
16
17 // Initializes the AudioDecoder with the audio codec configuration and CDM id. 10 // Initializes the AudioDecoder with the audio codec configuration and CDM id.
18 // For the unencrypted streams the |cdm_id| is ignored. Executed the callback 11 // For the unencrypted streams the |cdm_id| is ignored. Executed the callback
19 // with whether the initialization succeeded, and whether the pipeline needs 12 // with whether the initialization succeeded, and whether the pipeline needs
20 // bitstream conversion. 13 // bitstream conversion.
21 Initialize(AudioDecoderClient client, AudioDecoderConfig config, int32 cdm_id) 14 Initialize(AudioDecoderClient client, AudioDecoderConfig config, int32 cdm_id)
22 => (bool success, bool needs_bitstream_conversion); 15 => (bool success, bool needs_bitstream_conversion);
23 16
24 // Establishes data connection. Should be called before Decode(). 17 // Establishes data connection. Should be called before Decode().
25 SetDataSource(handle<data_pipe_consumer> receive_pipe); 18 SetDataSource(handle<data_pipe_consumer> receive_pipe);
26 19
(...skipping 10 matching lines...) Expand all
37 // Resets decoder state. Should be called only if Initialize() succeeds. 30 // Resets decoder state. Should be called only if Initialize() succeeds.
38 // All pending Decode() requests will be finished or aborted, then the method 31 // All pending Decode() requests will be finished or aborted, then the method
39 // executes the callback. 32 // executes the callback.
40 Reset() => (); 33 Reset() => ();
41 }; 34 };
42 35
43 interface AudioDecoderClient { 36 interface AudioDecoderClient {
44 // Sends the decoded audio buffer back to the proxy. 37 // Sends the decoded audio buffer back to the proxy.
45 OnBufferDecoded(AudioBuffer buffer); 38 OnBufferDecoded(AudioBuffer buffer);
46 }; 39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698