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

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

Issue 2429723006: MojoVideoDecoder: Plumb metadata methods. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: media/mojo/interfaces/video_decoder.mojom
diff --git a/media/mojo/interfaces/video_decoder.mojom b/media/mojo/interfaces/video_decoder.mojom
index f0f4ae32b5454c2354725d6554552f3faee51364..6c9d3f138508143d0e4bcdfe937fcaa0d11b0892 100644
--- a/media/mojo/interfaces/video_decoder.mojom
+++ b/media/mojo/interfaces/video_decoder.mojom
@@ -23,25 +23,31 @@ interface VideoDecoder {
//
// If |low_delay| is true, the decoder must output frames as soon as possible;
// in particular, it must not wait for another Decode() request, except as
- // required for frame reordering.
- Initialize(VideoDecoderConfig config, bool low_delay) => (bool success);
+ // required for frame reordering. Implementations must fail initialization if
+ // they cannot satisfy this requirement.
+ //
+ // On completion, the callback also includes |needs_bitstream_conversion|,
+ // indicating whether decode buffers need bitstream conversion, and
+ // |max_decode_requests|, the maximum number of concurrent Decode() requests
+ // the implementation supports.
+ Initialize(VideoDecoderConfig config, bool low_delay) =>
+ (bool success, bool needs_bitstream_conversion,
+ int32 max_decode_requests);
// Request decoding of exactly one frame or an EOS buffer. This must not be
- // called while there are pending Configure(), Reset(), or Decode() requests.
+ // called while there are pending Initialize(), Reset(), or Decode(EOS)
+ // requests.
//
// Implementations must eventually execute the callback, even if Decode() is
// not called again. It is not required that the decode status match the
- // actual result of decoding a frame; only that decode errors are eventually
- // reported (such as at EOS). The purpose of the callback is primarily for
- // Decode() rate control.
- //
- // If |buffer| is an EOS buffer, implementations execute all other pending
- // Decode() callbacks and output all pending frames before executing the EOS
- // buffer Decode() callback. (That is, they must flush.)
+ // actual result of decoding the buffer, only that decode errors are
+ // eventually reported (such as at EOS).
//
- // TODO(sandersd): Plumb GetMaxDecodeRequests() so that parallel Decode()
- // requests can be allowed.
- Decode(DecoderBuffer buffer) => (DecodeStatus status);
+ // If |buffer| is an EOS buffer, implementations must execute all other
+ // pending Decode() callbacks and output all pending frames before executing
+ // the Decode(EOS) callback. (That is, they must flush.)
+ Decode(DecoderBuffer buffer) =>
+ (DecodeStatus status, bool can_read_without_stalling);
// Reset the decoder. All ongoing Decode() requests must be completed or
// aborted before executing the callback. This must not be called while there

Powered by Google App Engine
This is Rietveld 408576698