doc/ffprobe.xsd: fix order and missing elements/attributes
[ffmpeg.git] / doc / ffprobe.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4     targetNamespace="http://www.ffmpeg.org/schema/ffprobe"
5     xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe">
6
7     <xsd:element name="ffprobe" type="ffprobe:ffprobeType"/>
8
9     <xsd:complexType name="ffprobeType">
10         <xsd:sequence>
11             <xsd:element name="program_version"  type="ffprobe:programVersionType"  minOccurs="0" maxOccurs="1" />
12             <xsd:element name="library_versions" type="ffprobe:libraryVersionsType" minOccurs="0" maxOccurs="1" />
13             <xsd:element name="packets"  type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
14             <xsd:element name="frames"   type="ffprobe:framesType"  minOccurs="0" maxOccurs="1" />
15             <xsd:element name="programs" type="ffprobe:programsType" minOccurs="0" maxOccurs="1" />
16             <xsd:element name="streams"  type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
17             <xsd:element name="chapters" type="ffprobe:chaptersType" minOccurs="0" maxOccurs="1" />
18             <xsd:element name="format"   type="ffprobe:formatType"  minOccurs="0" maxOccurs="1" />
19             <xsd:element name="error"    type="ffprobe:errorType"   minOccurs="0" maxOccurs="1" />
20         </xsd:sequence>
21     </xsd:complexType>
22
23     <xsd:complexType name="packetsType">
24         <xsd:sequence>
25             <xsd:element name="packet" type="ffprobe:packetType" minOccurs="0" maxOccurs="unbounded"/>
26         </xsd:sequence>
27     </xsd:complexType>
28
29     <xsd:complexType name="framesType">
30         <xsd:sequence>
31             <xsd:choice minOccurs="0" maxOccurs="unbounded">
32                 <xsd:element name="frame" type="ffprobe:frameType" minOccurs="0" maxOccurs="unbounded"/>
33                 <xsd:element name="subtitle" type="ffprobe:subtitleType" minOccurs="0" maxOccurs="unbounded"/>
34             </xsd:choice>
35         </xsd:sequence>
36     </xsd:complexType>
37
38     <xsd:complexType name="packetType">
39       <xsd:attribute name="codec_type"    type="xsd:string" use="required" />
40       <xsd:attribute name="stream_index"  type="xsd:int" use="required" />
41       <xsd:attribute name="pts"           type="xsd:long"  />
42       <xsd:attribute name="pts_time"      type="xsd:float" />
43       <xsd:attribute name="dts"           type="xsd:long"  />
44       <xsd:attribute name="dts_time"      type="xsd:float" />
45       <xsd:attribute name="duration"      type="xsd:long"  />
46       <xsd:attribute name="duration_time" type="xsd:float" />
47       <xsd:attribute name="convergence_duration"      type="xsd:long"  />
48       <xsd:attribute name="convergence_duration_time" type="xsd:float" />
49       <xsd:attribute name="size"          type="xsd:long" use="required" />
50       <xsd:attribute name="pos"           type="xsd:long"  />
51       <xsd:attribute name="flags"         type="xsd:string" use="required" />
52       <xsd:attribute name="data"          type="xsd:string" />
53     </xsd:complexType>
54
55     <xsd:complexType name="frameType">
56       <xsd:sequence>
57             <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
58       </xsd:sequence>
59
60       <xsd:attribute name="media_type"    type="xsd:string" use="required"/>
61       <xsd:attribute name="key_frame"     type="xsd:int"    use="required"/>
62       <xsd:attribute name="pts"           type="xsd:long" />
63       <xsd:attribute name="pts_time"      type="xsd:float"/>
64       <xsd:attribute name="pkt_pts"       type="xsd:long" />
65       <xsd:attribute name="pkt_pts_time"  type="xsd:float"/>
66       <xsd:attribute name="pkt_dts"       type="xsd:long" />
67       <xsd:attribute name="pkt_dts_time"  type="xsd:float"/>
68       <xsd:attribute name="best_effort_timestamp"      type="xsd:long" />
69       <xsd:attribute name="best_effort_timestamp_time" type="xsd:float" />
70       <xsd:attribute name="pkt_duration"  type="xsd:long" />
71       <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
72       <xsd:attribute name="pkt_pos"       type="xsd:long" />
73       <xsd:attribute name="pkt_size"      type="xsd:int" />
74
75       <!-- audio attributes -->
76       <xsd:attribute name="sample_fmt"             type="xsd:string"/>
77       <xsd:attribute name="nb_samples"             type="xsd:long"  />
78       <xsd:attribute name="channels"               type="xsd:int"   />
79       <xsd:attribute name="channel_layout"         type="xsd:string"/>
80
81       <!-- video attributes -->
82       <xsd:attribute name="width"                  type="xsd:long"  />
83       <xsd:attribute name="height"                 type="xsd:long"  />
84       <xsd:attribute name="pix_fmt"                type="xsd:string"/>
85       <xsd:attribute name="sample_aspect_ratio"    type="xsd:string"/>
86       <xsd:attribute name="pict_type"              type="xsd:string"/>
87       <xsd:attribute name="coded_picture_number"   type="xsd:long"  />
88       <xsd:attribute name="display_picture_number" type="xsd:long"  />
89       <xsd:attribute name="interlaced_frame"       type="xsd:int"   />
90       <xsd:attribute name="top_field_first"        type="xsd:int"   />
91       <xsd:attribute name="repeat_pict"            type="xsd:int"   />
92     </xsd:complexType>
93
94     <xsd:complexType name="subtitleType">
95       <xsd:attribute name="media_type"         type="xsd:string" fixed="subtitle" use="required"/>
96       <xsd:attribute name="pts"                type="xsd:long" />
97       <xsd:attribute name="pts_time"           type="xsd:float"/>
98       <xsd:attribute name="format"             type="xsd:int"  />
99       <xsd:attribute name="start_display_time" type="xsd:int"  />
100       <xsd:attribute name="end_display_time"   type="xsd:int"  />
101       <xsd:attribute name="num_rects"          type="xsd:int"  />
102     </xsd:complexType>
103
104     <xsd:complexType name="streamsType">
105         <xsd:sequence>
106             <xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
107         </xsd:sequence>
108     </xsd:complexType>
109
110     <xsd:complexType name="programsType">
111         <xsd:sequence>
112             <xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
113         </xsd:sequence>
114     </xsd:complexType>
115
116     <xsd:complexType name="streamDispositionType">
117       <xsd:attribute name="default"          type="xsd:int" use="required" />
118       <xsd:attribute name="dub"              type="xsd:int" use="required" />
119       <xsd:attribute name="original"         type="xsd:int" use="required" />
120       <xsd:attribute name="comment"          type="xsd:int" use="required" />
121       <xsd:attribute name="lyrics"           type="xsd:int" use="required" />
122       <xsd:attribute name="karaoke"          type="xsd:int" use="required" />
123       <xsd:attribute name="forced"           type="xsd:int" use="required" />
124       <xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
125       <xsd:attribute name="visual_impaired"  type="xsd:int" use="required" />
126       <xsd:attribute name="clean_effects"    type="xsd:int" use="required" />
127       <xsd:attribute name="attached_pic"     type="xsd:int" use="required" />
128     </xsd:complexType>
129
130     <xsd:complexType name="streamType">
131       <xsd:sequence>
132         <xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
133         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
134       </xsd:sequence>
135
136       <xsd:attribute name="index"            type="xsd:int" use="required"/>
137       <xsd:attribute name="codec_name"       type="xsd:string" />
138       <xsd:attribute name="codec_long_name"  type="xsd:string" />
139       <xsd:attribute name="profile"          type="xsd:string" />
140       <xsd:attribute name="codec_type"       type="xsd:string" />
141       <xsd:attribute name="codec_time_base"  type="xsd:string" use="required"/>
142       <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
143       <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
144       <xsd:attribute name="extradata"        type="xsd:string" />
145
146       <!-- video attributes -->
147       <xsd:attribute name="width"                type="xsd:int"/>
148       <xsd:attribute name="height"               type="xsd:int"/>
149       <xsd:attribute name="has_b_frames"         type="xsd:int"/>
150       <xsd:attribute name="sample_aspect_ratio"  type="xsd:string"/>
151       <xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
152       <xsd:attribute name="pix_fmt"              type="xsd:string"/>
153       <xsd:attribute name="level"                type="xsd:int"/>
154       <xsd:attribute name="color_range"          type="xsd:string"/>
155       <xsd:attribute name="color_space"          type="xsd:string"/>
156       <xsd:attribute name="timecode"             type="xsd:string"/>
157
158       <!-- audio attributes -->
159       <xsd:attribute name="sample_fmt"       type="xsd:string"/>
160       <xsd:attribute name="sample_rate"      type="xsd:int"/>
161       <xsd:attribute name="channels"         type="xsd:int"/>
162       <xsd:attribute name="channel_layout"   type="xsd:string"/>
163       <xsd:attribute name="bits_per_sample"  type="xsd:int"/>
164
165       <xsd:attribute name="id"               type="xsd:string"/>
166       <xsd:attribute name="r_frame_rate"     type="xsd:string" use="required"/>
167       <xsd:attribute name="avg_frame_rate"   type="xsd:string" use="required"/>
168       <xsd:attribute name="time_base"        type="xsd:string" use="required"/>
169       <xsd:attribute name="start_pts"        type="xsd:long"/>
170       <xsd:attribute name="start_time"       type="xsd:float"/>
171       <xsd:attribute name="duration_ts"      type="xsd:long"/>
172       <xsd:attribute name="duration"         type="xsd:float"/>
173       <xsd:attribute name="bit_rate"         type="xsd:int"/>
174       <xsd:attribute name="max_bit_rate"     type="xsd:int"/>
175       <xsd:attribute name="nb_frames"        type="xsd:int"/>
176       <xsd:attribute name="nb_read_frames"   type="xsd:int"/>
177       <xsd:attribute name="nb_read_packets"  type="xsd:int"/>
178     </xsd:complexType>
179
180     <xsd:complexType name="programType">
181       <xsd:sequence>
182         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
183         <xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
184       </xsd:sequence>
185
186       <xsd:attribute name="program_id"           type="xsd:int"    use="required"/>
187       <xsd:attribute name="program_num"          type="xsd:int"    use="required"/>
188       <xsd:attribute name="nb_streams"           type="xsd:int"    use="required"/>
189       <xsd:attribute name="start_time"           type="xsd:float"/>
190       <xsd:attribute name="start_pts"            type="xsd:long"/>
191       <xsd:attribute name="end_time"             type="xsd:float"/>
192       <xsd:attribute name="end_pts"              type="xsd:long"/>
193       <xsd:attribute name="pmt_pid"              type="xsd:int"    use="required"/>
194       <xsd:attribute name="pcr_pid"              type="xsd:int"    use="required"/>
195     </xsd:complexType>
196
197     <xsd:complexType name="formatType">
198       <xsd:sequence>
199         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
200       </xsd:sequence>
201
202       <xsd:attribute name="filename"         type="xsd:string" use="required"/>
203       <xsd:attribute name="nb_streams"       type="xsd:int"    use="required"/>
204       <xsd:attribute name="nb_programs"      type="xsd:int"    use="required"/>
205       <xsd:attribute name="format_name"      type="xsd:string" use="required"/>
206       <xsd:attribute name="format_long_name" type="xsd:string"/>
207       <xsd:attribute name="start_time"       type="xsd:float"/>
208       <xsd:attribute name="duration"         type="xsd:float"/>
209       <xsd:attribute name="size"             type="xsd:long"/>
210       <xsd:attribute name="bit_rate"         type="xsd:long"/>
211       <xsd:attribute name="probe_score"      type="xsd:int"/>
212     </xsd:complexType>
213
214     <xsd:complexType name="tagType">
215       <xsd:attribute name="key"   type="xsd:string" use="required"/>
216       <xsd:attribute name="value" type="xsd:string" use="required"/>
217     </xsd:complexType>
218
219     <xsd:complexType name="errorType">
220       <xsd:attribute name="code"   type="xsd:int"    use="required"/>
221       <xsd:attribute name="string" type="xsd:string" use="required"/>
222     </xsd:complexType>
223
224     <xsd:complexType name="programVersionType">
225       <xsd:attribute name="version"          type="xsd:string" use="required"/>
226       <xsd:attribute name="copyright"        type="xsd:string" use="required"/>
227       <xsd:attribute name="build_date"       type="xsd:string" use="required"/>
228       <xsd:attribute name="build_time"       type="xsd:string" use="required"/>
229       <xsd:attribute name="compiler_ident"   type="xsd:string" use="required"/>
230       <xsd:attribute name="configuration"    type="xsd:string" use="required"/>
231     </xsd:complexType>
232
233     <xsd:complexType name="chaptersType">
234       <xsd:sequence>
235         <xsd:element name="chapter" type="ffprobe:chapterType" minOccurs="0" maxOccurs="unbounded"/>
236       </xsd:sequence>
237     </xsd:complexType>
238
239     <xsd:complexType name="chapterType">
240       <xsd:sequence>
241         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
242       </xsd:sequence>
243
244       <xsd:attribute name="id"         type="xsd:int" use="required"/>
245       <xsd:attribute name="time_base"  type="xsd:string" use="required"/>
246       <xsd:attribute name="start"      type="xsd:int" use="required"/>
247       <xsd:attribute name="start_time" type="xsd:float"/>
248       <xsd:attribute name="end"        type="xsd:int" use="required"/>
249       <xsd:attribute name="end_time"   type="xsd:float" use="required"/>
250     </xsd:complexType>
251
252     <xsd:complexType name="libraryVersionType">
253       <xsd:attribute name="name"        type="xsd:string" use="required"/>
254       <xsd:attribute name="major"       type="xsd:int"    use="required"/>
255       <xsd:attribute name="minor"       type="xsd:int"    use="required"/>
256       <xsd:attribute name="micro"       type="xsd:int"    use="required"/>
257       <xsd:attribute name="version"     type="xsd:int"    use="required"/>
258       <xsd:attribute name="ident"       type="xsd:string" use="required"/>
259     </xsd:complexType>
260
261     <xsd:complexType name="libraryVersionsType">
262         <xsd:sequence>
263           <xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
264         </xsd:sequence>
265     </xsd:complexType>
266 </xsd:schema>