forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For Spitzer, the audio decoder that supports encryption has to be instantiated in the GPU process. The decoder has to be split between a proxy and a service. This CL contains Mojo interface only. BUG=542910 Committed: https://crrev.com/cabbc3cc9b0c18f25d91f17bb6cdded528366695 Cr-Commit-Position: refs/heads/master@{#381360} Review URL: https://codereview.chromium.org/1809483002 Cr-Commit-Position: refs/heads/master@{#381544}
- Loading branch information
timav
authored and
Commit bot
committed
Mar 16, 2016
1 parent
450f772
commit baa96c7
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2016 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 media.interfaces; | ||
|
||
import "media/mojo/interfaces/media_types.mojom"; | ||
|
||
interface AudioDecoder { | ||
// Status of a decode operation. See media::AudioDecoder for description. | ||
enum DecodeStatus { | ||
OK, // We're all good. | ||
ABORTED, // We aborted as a result of Reset() or destruction. | ||
DECODE_ERROR, // A decoding error occurred. | ||
}; | ||
|
||
// Initializes the AudioDecoder with the audio codec configuration and CDM id. | ||
// For the unencrypted streams the |cdm_id| is ignored. Executed the callback | ||
// with whether the initialization succeeded, and whether the pipeline needs | ||
// bitstream conversion. | ||
Initialize(AudioDecoderConfig config, int32 cdm_id) | ||
=> (bool success, bool needs_bitstream_conversion); | ||
|
||
// Sends the |buffer| to the underlying codec. Should be called only after | ||
// Initialize() succeeds. The callback with the status is called after the | ||
// decoder has accepted corresponding DecoderBuffer, indicating that the | ||
// pipeline can send next buffer to decode. | ||
// If |buffer| is an EOS buffer then the decoder must be flushed, i.e. all | ||
// pending buffers should be processed, the corresponding decoded buffers | ||
// should be returned to the proxy, and only then the service should return | ||
// DecoderStatus. | ||
Decode(DecoderBuffer buffer) => (DecodeStatus status); | ||
|
||
// Resets decoder state. Should be called only if Initialize() succeeds. | ||
// All pending Decode() requests will be finished or aborted, then the method | ||
// executes the callback. | ||
Reset() => (); | ||
}; | ||
|
||
interface AudioDecoderClient { | ||
// Sends the decoded audio buffer back to the proxy. | ||
OnBufferDecoded(AudioBuffer buffer); | ||
}; |