Index: media/mojo/interfaces/media_types.mojom |
diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom |
index a16203ed551f90fd35c85c46a167c7faa7cacff7..2b137d3744f942aa516b98798e7dff971e85de6a 100644 |
--- a/media/mojo/interfaces/media_types.mojom |
+++ b/media/mojo/interfaces/media_types.mojom |
@@ -231,3 +231,59 @@ struct DecoderBuffer { |
// Indicates this buffer is part of a splice around |splice_timestamp_usec|. |
int64 splice_timestamp_usec; |
}; |
+ |
+// This defines a mojo transport format for media::AudioBuffer. |
+struct AudioBuffer { |
+ // Format of the audio. |
+ SampleFormat sample_format; |
+ |
+ // How the channels are laid out. |
+ ChannelLayout channel_layout; |
+ |
+ // Number of channels. |
+ int32 channel_count; |
+ |
+ // Sample rate of the buffer. |
+ int32 sample_rate; |
+ |
+ // Number of frames in the buffer. |
+ int32 frame_count; |
+ |
+ // True if end of stream. |
+ bool end_of_stream; |
+ |
+ // Timestamp in microseconds of the first frame. |
+ int64 timestamp_usec; |
+ |
+ // Channel data. |
+ array<uint8>? data; |
xhwang
2015/11/23 22:22:18
"?" makes it nullable. In what case can we have nu
jrummell
2015/11/24 02:37:53
Done.
|
+}; |
+ |
+// This defines a mojo transport format for media::VideoFrame. |
xhwang
2015/11/23 22:22:18
Add a TODO to support shared memory based VideoFra
jrummell
2015/11/24 02:37:53
Done.
|
+struct VideoFrame { |
+ // Format of the decrypted frame. |
xhwang
2015/11/23 22:22:18
"decrypted" not needed as this is a generic VideoF
jrummell
2015/11/24 02:37:53
Done.
|
+ VideoFormat format; |
+ |
+ // Width and height of the video frame, in pixels. |
+ int32 width; |
+ int32 height; |
xhwang
2015/11/23 22:22:18
mojo.Rect coded_size?
"coded" would be consistent
jrummell
2015/11/24 02:37:53
Done.
|
+ |
+ // Visible size of the frame. |
+ int32 visible_width; |
+ int32 visible_height; |
xhwang
2015/11/23 22:22:18
Use mojo.Rect
jrummell
2015/11/24 02:37:53
Done.
|
+ |
+ // Natural size of the frame. |
+ int32 natural_width; |
+ int32 natural_height; |
xhwang
2015/11/23 22:22:18
Use mojo.Rect
jrummell
2015/11/24 02:37:53
It's actually mojo.Size. Done.
|
+ |
+ // True if end of stream. |
+ bool end_of_stream; |
+ |
+ // Timestamp in microseconds of the associated frame. |
+ int64 timestamp_usec; |
+ |
+ // Frame data for each plane. |
+ array<uint8>? y_data; |
xhwang
2015/11/23 22:22:18
ditto about nullable data.
jrummell
2015/11/24 02:37:53
Done.
|
+ array<uint8>? u_data; |
+ array<uint8>? v_data; |
+}; |