// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module media.mojom; import "gpu/ipc/common/sync_token.mojom"; import "media/mojo/mojom/media_log.mojom"; import "media/mojo/mojom/media_types.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; import "ui/gfx/mojom/color_space.mojom"; // Serializable rule for matching VideoDecoderConfigs. struct SupportedVideoDecoderConfig { // Range of VideoCodecProfiles to match, inclusive. VideoCodecProfile profile_min; VideoCodecProfile profile_max; // Range of coded sizes to match, inclusive in each dimension. gfx.mojom.Size coded_size_min; gfx.mojom.Size coded_size_max; // Match configs that have encryption configured. bool allow_encrypted; // Do not match configs that do not have encryption configured. This is used // on Android when the internal software decoder is preferred over the // platform decoder (eg. when the platform decoder is a software decoder). bool require_encrypted; }; // Identifies a CommandBufferStub. MediaGpuChannelManager is responsible // for minting |channel_token| values. struct CommandBufferId { mojo_base.mojom.UnguessableToken channel_token; int32 route_id; }; [Native] struct OverlayInfo; // Interface for releasing remote VideoFrames. It is separated from VideoDecoder // so that VideoFrames can outlive their VideoDecoder. interface VideoFrameHandleReleaser { // Signals that the VideoFrame identified by |release_token| should be // released. |release_sync_token| indicates the last use of the VideoFrame // (in a GPU command buffer) by the client. If the VideoDecoder outputs frames // that have a callback for releasing mailboxes (i.e., // VideoFrame::HasReleaseMailboxCB() returns true), the |release_sync_token| // is required but may be empty, and in that case, implementations should let // the about-to-be-released VideoFrame retain whatever SyncToken it has. For // other frames, it's assumed that the frame can be released immediately upon // calling ReleaseVideoFrame() and |release_sync_token| does not need to be // supplied (and should be ignored by implementations if supplied). ReleaseVideoFrame(mojo_base.mojom.UnguessableToken release_token, gpu.mojom.SyncToken? release_sync_token); }; // A Mojo equivalent of media::VideoDecoder. In practice, this is used for // hardware decode offloading; in this case the client is a