2013-10-17 21:10:38 +00:00
|
|
|
// This file defines the protocol between Muxer and classes for generating MPD
|
|
|
|
// files.
|
|
|
|
|
|
|
|
syntax = "proto2";
|
|
|
|
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
|
|
|
|
|
|
package dash_packager;
|
|
|
|
|
|
|
|
message Range {
|
|
|
|
optional uint64 begin = 1;
|
|
|
|
optional uint64 end = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MediaInfo {
|
|
|
|
message VideoInfo {
|
|
|
|
optional string codec = 1;
|
|
|
|
optional uint32 width = 2;
|
|
|
|
optional uint32 height = 3;
|
2013-12-11 00:27:25 +00:00
|
|
|
optional uint32 time_scale = 4;
|
2013-10-17 21:10:38 +00:00
|
|
|
// Relative to |time_scale|. IOW |time_scale| / |frame_duration| is the
|
|
|
|
// framerate.
|
2013-12-11 00:27:25 +00:00
|
|
|
optional uint64 frame_duration = 5;
|
|
|
|
optional bytes decoder_config = 6;
|
2013-10-17 21:10:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message AudioInfo {
|
|
|
|
optional string codec = 1;
|
|
|
|
optional uint32 sampling_frequency = 2;
|
2013-12-11 00:27:25 +00:00
|
|
|
optional uint32 time_scale = 3;
|
|
|
|
optional uint32 num_channels = 4;
|
|
|
|
optional string language = 5;
|
|
|
|
optional bytes decoder_config = 6;
|
2013-10-17 21:10:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message TextInfo {
|
|
|
|
optional string format = 1;
|
|
|
|
optional string language = 2;
|
|
|
|
}
|
|
|
|
|
2014-01-10 20:04:09 +00:00
|
|
|
message ContentProtectionXml {
|
|
|
|
message AttributeNameValuePair {
|
|
|
|
optional string name = 1;
|
|
|
|
optional string value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Element {
|
|
|
|
repeated AttributeNameValuePair attributes = 1;
|
|
|
|
repeated Element subelements = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
optional string scheme_id_uri = 1;
|
|
|
|
optional string value = 2;
|
|
|
|
repeated AttributeNameValuePair attributes = 3;
|
|
|
|
repeated Element subelements = 4;
|
2013-10-17 21:10:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional uint32 bandwidth = 1;
|
2013-12-11 00:27:25 +00:00
|
|
|
repeated VideoInfo video_info = 2;
|
|
|
|
repeated AudioInfo audio_info = 3;
|
|
|
|
repeated TextInfo text_info = 4;
|
2014-01-10 20:04:09 +00:00
|
|
|
repeated ContentProtectionXml content_protections = 5;
|
2013-10-17 21:10:38 +00:00
|
|
|
|
2013-12-18 01:17:35 +00:00
|
|
|
// This is the reference time scale if there are multiple VideoInfo and/or
|
|
|
|
// AudioInfo.
|
|
|
|
optional uint32 reference_time_scale = 13;
|
|
|
|
|
2013-10-17 21:10:38 +00:00
|
|
|
// VOD only.
|
2013-12-11 00:27:25 +00:00
|
|
|
optional Range init_range = 6;
|
|
|
|
optional Range index_range = 7;
|
|
|
|
optional string media_file_name = 8;
|
|
|
|
optional float media_duration_seconds = 9;
|
2013-10-17 21:10:38 +00:00
|
|
|
// END VOD only.
|
|
|
|
|
|
|
|
// LIVE only.
|
2013-12-11 00:27:25 +00:00
|
|
|
optional string init_segment_name = 10;
|
|
|
|
optional string segment_template = 11;
|
2013-10-17 21:10:38 +00:00
|
|
|
// This value is the user input “segment duration”.
|
|
|
|
// This value is not necessarily the same as the value passed to
|
|
|
|
// MpdNotifier::NotifyNewSegment().
|
2013-12-11 00:27:25 +00:00
|
|
|
optional float segment_duration_seconds = 12;
|
2013-10-17 21:10:38 +00:00
|
|
|
// END LIVE only.
|
|
|
|
}
|