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

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

Issue 1468153003: Define AudioBuffer and VideoFrame for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch statement Created 5 years, 1 month 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
« no previous file with comments | « media/mojo/interfaces/decryptor.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..78784f94fd87a8dfc85e72412f886a7e22973106 100644
--- a/media/mojo/interfaces/media_types.mojom
+++ b/media/mojo/interfaces/media_types.mojom
@@ -231,3 +231,58 @@ 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. Will be null for EOS buffers.
+ array<uint8>? data;
+};
+
+// This defines a mojo transport format for media::VideoFrame.
+// TODO(jrummell): Support shared memory based VideoFrame to avoid copying
+// the data multiple times.
+struct VideoFrame {
+ // Format of the frame.
+ VideoFormat format;
+
+ // Width and height of the video frame, in pixels.
+ mojo.Size coded_size;
+
+ // Visible size of the frame.
+ mojo.Rect visible_rect;
+
+ // Natural size of the frame.
+ mojo.Size natural_size;
+
+ // True if end of stream.
+ bool end_of_stream;
+
+ // Timestamp in microseconds of the associated frame.
+ int64 timestamp_usec;
+
+ // Frame data for each plane. Will be null for EOS buffers.
+ array<uint8>? y_data;
+ array<uint8>? u_data;
+ array<uint8>? v_data;
+};
« no previous file with comments | « media/mojo/interfaces/decryptor.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698