-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "gpu/ipc/common/mailbox_holder.mojom";
import "gpu/ipc/common/vulkan_ycbcr_info.mojom";
+import "media/mojo/mojom/audio_data.mojom";
+import "media/mojo/mojom/encryption_pattern.mojom";
+import "mojo/public/mojom/base/shared_memory.mojom";
import "mojo/public/mojom/base/time.mojom";
import "mojo/public/mojom/base/values.mojom";
import "mojo/public/mojom/base/unguessable_token.mojom";
[Native]
enum ChannelLayout;
-// See media/base/decode_status.h for descriptions.
-[Native]
-enum DecodeStatus;
-
-// See media/base/status_codes.h for descriptions.
-[Native]
-enum StatusCode;
-
// See media/base/media_content_type.h for descriptions.
[Native]
enum MediaContentType;
[Native]
enum OutputDeviceStatus;
-// See media/base/pipeline_status.h for descriptions.
-[Native]
-enum PipelineStatus;
-
// See media/base/sample_format.h for descriptions.
[Native]
enum SampleFormat;
kVideoRotation270,
};
-// see media/base/video_frame_metadata.h for descriptions.
-enum CopyMode {
- kCopyToNewTexture,
- kCopyMailboxesOnly,
-};
-
// see third_party/blink/public/platform/web_fullscreen_video_status.h for
// descriptions.
[Native]
[Native]
enum MediaStatusState;
-// This defines a mojo transport format for media::EncryptionPattern
-// See media/base/encryption_pattern.h for description.
-struct EncryptionPattern {
- uint32 crypt_byte_block;
- uint32 skip_byte_block;
-};
-
// See media/base/encryption_scheme.h for description.
[Native]
enum EncryptionScheme;
kEncryptedWithClearLead,
};
+// See media/base/svc_scalability_mode.h for description.
+// This mojo enum only list hardware codec supported scalability mode.
+enum SVCScalabilityMode {
+ // kUnsupportedMode is used to handle the enum differ of C++ and Mojo
+ // SVCScalabilityMode in ToMojom, should not be used in other place.
+ kUnsupportedMode,
+ kL1T1,
+ kL1T2,
+ kL1T3,
+ kL2T1Key,
+ kL2T2Key,
+ kL2T3Key,
+ kL3T1Key,
+ kL3T2Key,
+ kL3T3Key,
+};
+
+// This mojo enum only list hardware codec supported scalability mode.
+// See media/base/svc_scalability_mode.h for description.
+enum SVCInterLayerPredMode {
+ kOff,
+ kOn,
+ kOnKeyPic
+};
+
// This defines a mojo transport format for media::VideoColorSpace.
// See media/base/video_color_space.h for description.
struct VideoColorSpace {
int32 codec_delay;
AudioCodecProfile profile;
ChannelLayout target_output_channel_layout;
+ SampleFormat target_output_sample_format;
bool should_discard_decoder_delay;
+ array<uint8> aac_extra_data;
};
// This defines a mojo transport format for media::VideoDecoderConfig.
EncryptionScheme encryption_scheme;
VideoColorSpace color_space_info;
gfx.mojom.HDRMetadata? hdr_metadata;
+ [EnableIf=is_tizen_tv]
+ string hdr_info;
+ [EnableIf=is_tizen_tv]
+ int32 framerate_num;
+ [EnableIf=is_tizen_tv]
+ int32 framerate_den;
};
// Native struct media::SubsampleEntry;
[Native]
struct SubsampleEntry;
+// Important events happened to the CDM. See media/cdm/cdm_document_service.h
+// for descriptions.
+[EnableIf=is_win]
+enum CdmEvent {
+ kSignificantPlayback,
+ kPlaybackError,
+ kCdmError,
+ kHardwareContextReset,
+};
+
// See media::CdmSessionClosedReason for descriptions.
enum CdmSessionClosedReason {
kInternalError,
kResourceEvicted,
};
+// This defines a mojo transport format for media::SharedImageFormatType.
+// See media/base/video_frame.h for descriptions.
+enum SharedImageFormatType {
+ kLegacy,
+ kSharedImageFormat,
+ kSharedImageFormatExternalSampler,
+};
+
// This defines a mojo transport format for media::DecryptConfig.
// See media/base/decrypt_config.h for descriptions.
struct DecryptConfig {
EncryptionPattern? encryption_pattern;
};
+// This defines a mojo transport format for media::DecoderBufferSideData.
+struct DecoderBufferSideData {
+ array<uint32> spatial_layers;
+ array<uint8> alpha_data;
+ uint64 secure_handle;
+};
+
// This defines a mojo transport format for media::DecoderBuffer.
struct DecoderBuffer {
mojo_base.mojom.TimeDelta timestamp;
// Indicates whether or not this buffer is a random access point.
bool is_key_frame;
- // Empty when |side_data| doesn't exist.
- array<uint8> side_data;
-
// DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
DecryptConfig? decrypt_config;
// These fields indicate the amount of data to discard after decoding.
mojo_base.mojom.TimeDelta front_discard;
mojo_base.mojom.TimeDelta back_discard;
+
+ [EnableIf=is_tizen_tv]
+ uint32 tz_handle;
+ [EnableIf=is_tizen_tv]
+ uint32 tz_buffer_size;
+ [EnableIf=is_tizen_tv]
+ uint64 decryptor_handle;
+
+ DecoderBufferSideData? side_data;
};
// This defines a mojo transport format for media::AudioBuffer.
array<uint8> data;
};
-// This defines a mojo transport format for an interleaved, signed
-// 16-bit audio buffer.
-struct AudioDataS16 {
- // Number of channels.
- int32 channel_count;
-
- // Sample rate of the buffer.
- int32 sample_rate;
-
- // Number of frames in the buffer.
- int32 frame_count;
-
- // Channel data.
- array<int16> data;
-};
-
// See media/base/video_frame_metadata.h for a description of fields.
// TODO(crbug.com/657632): Remove |has_*| values and use nullable types.
struct VideoFrameMetadata {
gfx.mojom.Rect? capture_update_rect;
- bool has_copy_mode;
- CopyMode copy_mode;
+ gfx.mojom.Size? source_size;
+
+ gfx.mojom.Rect? region_capture_rect;
+ uint32 sub_capture_target_version;
+
+ bool copy_required;
bool end_of_stream;
bool hw_protected;
+ bool is_webgpu_compatible;
+
mojo_base.mojom.UnguessableToken? overlay_plane_id;
bool power_efficient;
mojo_base.mojom.TimeTicks? receive_time;
mojo_base.mojom.TimeDelta? wallclock_frame_duration;
-
- uint32 hw_protected_validation_id;
};
// This defines a mojo transport format for media::VideoFrame.
gfx.mojom.ColorSpace color_space;
gfx.mojom.HDRMetadata? hdr_metadata;
+
+ media.mojom.SharedImageFormatType shared_image_format_type;
};
// Possible choices for storing VideoFrame data.
union VideoFrameData {
EosVideoFrameData eos_data;
- SharedBufferVideoFrameData shared_buffer_data;
+ SharedMemoryVideoFrameData shared_memory_data;
GpuMemoryBufferVideoFrameData gpu_memory_buffer_data;
MailboxVideoFrameData mailbox_data;
};
struct EosVideoFrameData {
};
-// This defines video frame data stored in a Mojo shared buffer.
-struct SharedBufferVideoFrameData {
- // Reference to the shared memory containing the frame's data.
- handle<shared_buffer> frame_data;
- uint64 frame_data_size;
+// This defines video frame data for STORAGE_SHMEM VideoFrame.
+struct SharedMemoryVideoFrameData {
+ // Shared memory region for the frame data.
+ mojo_base.mojom.ReadOnlySharedMemoryRegion frame_data;
// Stride and offsets for each plane. Offsets are relative to the start
// of |frame_data|.
};
// See media/base/status.h for descriptions.
-struct Status {
- StatusCode code;
- string? message;
- array<mojo_base.mojom.Value> frames;
- array<media.mojom.Status> causes;
- mojo_base.mojom.Value? data;
+struct StatusData {
+ string group;
+ uint16 code;
+ string message;
+ mojo_base.mojom.ListValue frames;
+ StatusData? cause;
+ mojo_base.mojom.Value data;
+ uint64 packed_root_cause;
+};
+
+struct EncoderStatus {
+ StatusData? internal;
+};
+
+struct DecoderStatus {
+ StatusData? internal;
+};
+
+struct PipelineStatus {
+ StatusData? internal;
};
// Types of media stream, categorised by the media stream's source.
kDeviceInUse = 2,
};
-// See media/base/renderer_factory_selector.h for description.
+// See media/base/renderer.h for description.
enum RendererType {
- kDefault = 0, // DefaultRendererFactory
+ kRendererImpl = 0, // RendererImplFactory
kMojo = 1, // MojoRendererFactory
kMediaPlayer = 2, // MediaPlayerRendererClientFactory
kCourier = 3, // CourierRendererFactory
kFlinging = 4, // FlingingRendererClientFactory
kCast = 5, // CastRendererClientFactory
kMediaFoundation = 6, // MediaFoundationRendererClientFactory
- kFuchsia = 7, // FuchsiaRendererFactory
+ // kFuchsia = 7, // Deprecated
kRemoting = 8, // RemotingRendererFactory for remoting::Receiver
kCastStreaming = 9, // CastStreamingRendererFactory
+ kContentEmbedderDefined = 10, // Defined by the content embedder
+ kTest= 11, // Renderer implementations used in tests
};