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

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

Issue 684963003: Add support for external video renderers in mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_config
Patch Set: Created 6 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/media_types.mojom
diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom
index edaf282aac25e46f915f6b399df85ef83928380c..fb99a2a08b0202d394c7b2efc79115e1cd6d4a00 100644
--- a/media/mojo/interfaces/media_types.mojom
+++ b/media/mojo/interfaces/media_types.mojom
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import "mojo/services/public/interfaces/geometry/geometry.mojom"
+
module mojo {
// See media/base/buffering_state.h for descriptions.
@@ -84,6 +86,63 @@ enum SampleFormat {
Max = PlanarF32,
};
+enum VideoFormat {
+ UNKNOWN = 0, // Unknown format value.
+ YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples
+ YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples
+ I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples.
+ YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples.
+ HOLE = 5, // Hole frame.
+ NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic.
+ YV12J = 7, // JPEG color range version of YV12
+ NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane.
+ YV24 = 9, // 24bpp YUV planar, no subsampling.
+ FORMAT_MAX = YV24, // Must always be equal to largest entry logged.
+};
+
+enum VideoCodec {
+ UNKNOWN = 0,
+ H264,
+ VC1,
+ MPEG2,
+ MPEG4,
+ THEORA,
+ VP8,
+ VP9,
+ Max = VP9
+};
+
+// Video stream profile. This *must* match PP_VideoDecoder_Profile.
+// (enforced in webkit/plugins/ppapi/ppb_video_decoder_impl.cc) and
+// gpu::VideoCodecProfile.
xhwang 2014/10/29 00:22:13 Update: needs to match media::VideoCodecProfile.
DaleCurtis 2014/10/30 23:16:56 Done.
+enum VideoCodecProfile {
+ // Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
+ // for example), and keep the values for a particular format grouped
+ // together for clarity.
+ VIDEO_CODEC_PROFILE_UNKNOWN = -1,
+ VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
+ H264PROFILE_MIN = 0,
+ H264PROFILE_BASELINE = H264PROFILE_MIN,
+ H264PROFILE_MAIN = 1,
+ H264PROFILE_EXTENDED = 2,
+ H264PROFILE_HIGH = 3,
+ H264PROFILE_HIGH10PROFILE = 4,
+ H264PROFILE_HIGH422PROFILE = 5,
+ H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
+ H264PROFILE_SCALABLEBASELINE = 7,
+ H264PROFILE_SCALABLEHIGH = 8,
+ H264PROFILE_STEREOHIGH = 9,
+ H264PROFILE_MULTIVIEWHIGH = 10,
+ H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
+ VP8PROFILE_MIN = 11,
+ VP8PROFILE_ANY = VP8PROFILE_MIN,
+ VP8PROFILE_MAX = VP8PROFILE_ANY,
+ VP9PROFILE_MIN = 12,
+ VP9PROFILE_ANY = VP9PROFILE_MIN,
+ VP9PROFILE_MAX = VP9PROFILE_ANY,
+ VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
+};
+
// This defines a mojo transport format for media::AudioDecoderConfig.
// See media/base/audio_decoder_config.h for descriptions.
struct AudioDecoderConfig {
@@ -96,6 +155,17 @@ struct AudioDecoderConfig {
int32 codec_delay;
};
+struct VideoDecoderConfig {
+ VideoCodec codec;
+ VideoCodecProfile profile;
+ VideoFormat format;
+ Size coded_size;
+ Rect visible_rect;
+ Size natural_size;
+ array<uint8>? extra_data;
+ bool is_encrypted;
+};
+
// This defines a mojo transport format for media::DecoderBuffer.
struct MediaDecoderBuffer {
// See media/base/buffers.h for details.

Powered by Google App Engine
This is Rietveld 408576698