xref: /haiku/src/add-ons/media/plugins/ffmpeg/MuxerTable.cpp (revision 9bd024edbe5d06358e4285100a3240e4d138a712)
1 /*
2  * Copyright 2009 Stephan Aßmus <superstippi@gmx.de>
3  * All rights reserved. Distributed under the terms of the MIT license.
4  */
5 
6 
7 #include "MuxerTable.h"
8 
9 
10 const media_file_format gMuxerTable[] = {
11 	{
12 		media_file_format::B_READABLE
13 			| media_file_format::B_KNOWS_ENCODED_VIDEO
14 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
15 		{ 0 },
16 		B_MISC_FORMAT_FAMILY,
17 		100,
18 		{ 0 },
19 		"video/3gpp",
20 		"3GPP video",
21 		"3gp",
22 		"3gp",
23 		{ 0 }
24 	},
25 	{
26 		media_file_format::B_READABLE
27 			| media_file_format::B_KNOWS_RAW_AUDIO
28 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
29 		{ 0 },
30 		B_WAV_FORMAT_FAMILY,
31 		100,
32 		{ 0 },
33 		"audio/ac3",
34 		"AC3",
35 		"ac3",
36 		"ac3",
37 		{ 0 }
38 	},
39 	{
40 		media_file_format::B_READABLE
41 			| media_file_format::B_KNOWS_RAW_VIDEO
42 			| media_file_format::B_KNOWS_RAW_AUDIO
43 			| media_file_format::B_KNOWS_ENCODED_VIDEO
44 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
45 		{ 0 },
46 		B_AVI_FORMAT_FAMILY,
47 		100,
48 		{ 0 },
49 		"video/x-asf",
50 		"ASF Movie",
51 		"asf",
52 		"asf",
53 		{ 0 }
54 	},
55 	{
56 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
57 			| media_file_format::B_KNOWS_RAW_VIDEO
58 			| media_file_format::B_KNOWS_RAW_AUDIO
59 			| media_file_format::B_KNOWS_ENCODED_VIDEO
60 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
61 		{ 0 },
62 		B_AVI_FORMAT_FAMILY,
63 		100,
64 		{ 0 },
65 		"video/x-msvideo",
66 		"AVI (Audio Video Interleaved)",
67 		"avi",
68 		"avi",
69 		{ 0 }
70 	},
71 	{
72 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
73 			| media_file_format::B_KNOWS_RAW_VIDEO
74 			| media_file_format::B_KNOWS_RAW_AUDIO
75 			| media_file_format::B_KNOWS_ENCODED_VIDEO
76 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
77 		{ 0 },
78 		B_QUICKTIME_FORMAT_FAMILY,
79 		100,
80 		{ 0 },
81 		"video/dv",
82 		"DV Movie",
83 		"dv",
84 		"dv",
85 		{ 0 }
86 	},
87 	{
88 		media_file_format::B_READABLE
89 			| media_file_format::B_KNOWS_RAW_AUDIO
90 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
91 		{ 0 },
92 		B_WAV_FORMAT_FAMILY,
93 		100,
94 		{ 0 },
95 		"audio/x-flac",
96 		"Free Lossless Audio",
97 		"flac",
98 		"flac",
99 		{ 0 }
100 	},
101 	{
102 		media_file_format::B_READABLE
103 			| media_file_format::B_KNOWS_RAW_VIDEO
104 			| media_file_format::B_KNOWS_RAW_AUDIO
105 			| media_file_format::B_KNOWS_ENCODED_VIDEO
106 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
107 		{ 0 },
108 		B_QUICKTIME_FORMAT_FAMILY,
109 		100,
110 		{ 0 },
111 		"video/x-flv",
112 		"Flash video",
113 		"flv",
114 		"flv",
115 		{ 0 }
116 	},
117 	{
118 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
119 			| media_file_format::B_KNOWS_RAW_VIDEO
120 			| media_file_format::B_KNOWS_RAW_AUDIO
121 			| media_file_format::B_KNOWS_ENCODED_VIDEO
122 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
123 		{ 0 },
124 		B_ANY_FORMAT_FAMILY,
125 		100,
126 		{ 0 },
127 		"video/x-matroska",
128 		"Matroska movie",
129 		"mkv",
130 		"mkv",
131 		{ 0 }
132 	},
133 	{
134 		media_file_format::B_READABLE
135 			| media_file_format::B_KNOWS_RAW_VIDEO
136 			| media_file_format::B_KNOWS_RAW_AUDIO
137 			| media_file_format::B_KNOWS_ENCODED_VIDEO
138 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
139 		{ 0 },
140 		B_QUICKTIME_FORMAT_FAMILY,
141 		100,
142 		{ 0 },
143 		"video/x-mov",
144 		"Quicktime movie",
145 		"mov",
146 		"mov",
147 		{ 0 }
148 	},
149 	{
150 		media_file_format::B_READABLE
151 			| media_file_format::B_KNOWS_RAW_AUDIO
152 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
153 		{ 0 },
154 		B_MPEG_FORMAT_FAMILY,
155 		100,
156 		{ 0 },
157 		"audio/mpeg",
158 		"MPEG Layer 3",
159 		"mp3",
160 		"mp3",
161 		{ 0 }
162 	},
163 	{
164 		media_file_format::B_READABLE
165 			| media_file_format::B_KNOWS_ENCODED_VIDEO
166 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
167 		{ 0 },
168 		B_QUICKTIME_FORMAT_FAMILY,
169 		100,
170 		{ 0 },
171 		"video/mp4",
172 		"MPEG (Motion Picture Experts Group) format 4",
173 		"mp4",
174 		"mp4",
175 		{ 0 }
176 	},
177 	{
178 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
179 			| media_file_format::B_KNOWS_ENCODED_VIDEO
180 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
181 		{ 0 },
182 		B_MPEG_FORMAT_FAMILY,
183 		100,
184 		{ 0 },
185 		"video/mpeg",
186 		"MPEG (Motion Picture Experts Group)",
187 		"mpg",
188 		"mpg",
189 		{ 0 }
190 	},
191 	{
192 		media_file_format::B_READABLE
193 			| media_file_format::B_KNOWS_ENCODED_VIDEO
194 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
195 		{ 0 },
196 		B_AVI_FORMAT_FAMILY,
197 		100,
198 		{ 0 },
199 		"video/mpeg",
200 		"MPEG TS",
201 		"mpegts",
202 		"mpegts",
203 		{ 0 }
204 	},
205 	{
206 		media_file_format::B_READABLE
207 			| media_file_format::B_KNOWS_ENCODED_VIDEO
208 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
209 		{ 0 },
210 		B_MPEG_FORMAT_FAMILY,
211 		100,
212 		{ 0 },
213 		"video/mpeg",
214 		"MPEG",
215 		"mpeg",
216 		"mpeg",
217 		{ 0 }
218 	},
219 	{
220 		media_file_format::B_READABLE
221 			| media_file_format::B_KNOWS_ENCODED_VIDEO
222 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
223 		{ 0 },
224 		B_QUICKTIME_FORMAT_FAMILY,
225 		100,
226 		{ 0 },
227 		"video/nsv",
228 		"NSV (NullSoft Video file)",
229 		"nsv",
230 		"nsv",
231 		{ 0 }
232 	},
233 // TODO: This one rejects unknown codecs. We probably need to define
234 // a media_format_family for it so that Encoders can announce their support
235 // for it specifically.
236 	{
237 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
238 			| media_file_format::B_KNOWS_ENCODED_VIDEO
239 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
240 		{ 0 },
241 		B_MISC_FORMAT_FAMILY,
242 		100,
243 		{ 0 },
244 		"audio/ogg",
245 		"Ogg (Xiph.Org Foundation)",
246 		"ogg",
247 		"ogg",
248 		{ 0 }
249 	},
250 	{
251 		media_file_format::B_READABLE
252 			| media_file_format::B_KNOWS_ENCODED_VIDEO
253 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
254 		{ 0 },
255 		B_AVI_FORMAT_FAMILY,
256 		100,
257 		{ 0 },
258 		"video/vnd.rn-realvideo",
259 		"RM (RealVideo clip)",
260 		"rm",
261 		"rm",
262 		{ 0 }
263 	},
264 	{
265 		media_file_format::B_READABLE
266 			| media_file_format::B_KNOWS_RAW_VIDEO
267 			| media_file_format::B_KNOWS_RAW_AUDIO
268 			| media_file_format::B_KNOWS_ENCODED_VIDEO
269 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
270 		{ 0 },
271 		B_QUICKTIME_FORMAT_FAMILY,
272 		100,
273 		{ 0 },
274 		"application/x-shockwave-flash",
275 		"Shockwave video",
276 		"swf",
277 		"swf",
278 		{ 0 }
279 	},
280 	{
281 		media_file_format::B_READABLE
282 			| media_file_format::B_KNOWS_ENCODED_VIDEO
283 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
284 		{ 0 },
285 		B_MPEG_FORMAT_FAMILY,
286 		100,
287 		{ 0 },
288 		"video/x-vob",
289 		"VOB movie",
290 		"vob",
291 		"vob",
292 		{ 0 }
293 	},
294 	{
295 		media_file_format::B_WRITABLE
296 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
297 		{ 0 },
298 		B_WAV_FORMAT_FAMILY,
299 		100,
300 		{ 0 },
301 		"audio/wav",
302 		"WAV Format",
303 		"wav",
304 		"wav",
305 		{ 0 }
306 	},
307 	{
308 		media_file_format::B_READABLE
309 			| media_file_format::B_KNOWS_ENCODED_VIDEO
310 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
311 		{ 0 },
312 		B_MISC_FORMAT_FAMILY,
313 		100,
314 		{ 0 },
315 		"video/webm",
316 		"WebM movie",
317 		"webm",
318 		"webm",
319 		{ 0 }
320 	},
321 };
322 
323 const size_t gMuxerCount = sizeof(gMuxerTable) / sizeof(media_file_format);
324 
325