xref: /haiku/src/add-ons/media/plugins/ffmpeg/MuxerTable.cpp (revision 18027fff34af4a666c1e62254b462cbaeae1859e)
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_RAW_AUDIO
14 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
15 		{ 0 },
16 		B_WAV_FORMAT_FAMILY,
17 		100,
18 		{ 0 },
19 		"audio/ac3",
20 		"AC3",
21 		"ac3",
22 		"ac3",
23 		{ 0 }
24 	},
25 	{
26 		media_file_format::B_READABLE
27 			| media_file_format::B_KNOWS_RAW_VIDEO
28 			| media_file_format::B_KNOWS_RAW_AUDIO
29 			| media_file_format::B_KNOWS_ENCODED_VIDEO
30 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
31 		{ 0 },
32 		B_AVI_FORMAT_FAMILY,
33 		100,
34 		{ 0 },
35 		"video/x-asf",
36 		"ASF Movie",
37 		"asf",
38 		"asf",
39 		{ 0 }
40 	},
41 	{
42 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
43 			| media_file_format::B_KNOWS_RAW_VIDEO
44 			| media_file_format::B_KNOWS_RAW_AUDIO
45 			| media_file_format::B_KNOWS_ENCODED_VIDEO
46 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
47 		{ 0 },
48 		B_AVI_FORMAT_FAMILY,
49 		100,
50 		{ 0 },
51 		"video/x-msvideo",
52 		"AVI (Audio Video Interleaved)",
53 		"avi",
54 		"avi",
55 		{ 0 }
56 	},
57 	{
58 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
59 			| media_file_format::B_KNOWS_RAW_VIDEO
60 			| media_file_format::B_KNOWS_RAW_AUDIO
61 			| media_file_format::B_KNOWS_ENCODED_VIDEO
62 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
63 		{ 0 },
64 		B_QUICKTIME_FORMAT_FAMILY,
65 		100,
66 		{ 0 },
67 		"video/dv",
68 		"DV Movie",
69 		"dv",
70 		"dv",
71 		{ 0 }
72 	},
73 	{
74 		media_file_format::B_READABLE
75 			| media_file_format::B_KNOWS_RAW_AUDIO
76 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
77 		{ 0 },
78 		B_WAV_FORMAT_FAMILY,
79 		100,
80 		{ 0 },
81 		"audio/x-flac",
82 		"Free Lossless Audio",
83 		"flac",
84 		"flac",
85 		{ 0 }
86 	},
87 	{
88 		media_file_format::B_READABLE
89 			| media_file_format::B_KNOWS_RAW_VIDEO
90 			| media_file_format::B_KNOWS_RAW_AUDIO
91 			| media_file_format::B_KNOWS_ENCODED_VIDEO
92 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
93 		{ 0 },
94 		B_QUICKTIME_FORMAT_FAMILY,
95 		100,
96 		{ 0 },
97 		"video/x-flv",
98 		"Flash video",
99 		"flv",
100 		"flv",
101 		{ 0 }
102 	},
103 	{
104 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
105 			| media_file_format::B_KNOWS_RAW_VIDEO
106 			| media_file_format::B_KNOWS_RAW_AUDIO
107 			| media_file_format::B_KNOWS_ENCODED_VIDEO
108 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
109 		{ 0 },
110 		B_QUICKTIME_FORMAT_FAMILY,
111 		100,
112 		{ 0 },
113 		"video/x-matroska",
114 		"Matroska movie",
115 		"mkv",
116 		"mkv",
117 		{ 0 }
118 	},
119 	{
120 		media_file_format::B_READABLE
121 			| media_file_format::B_KNOWS_RAW_VIDEO
122 			| media_file_format::B_KNOWS_RAW_AUDIO
123 			| media_file_format::B_KNOWS_ENCODED_VIDEO
124 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
125 		{ 0 },
126 		B_QUICKTIME_FORMAT_FAMILY,
127 		100,
128 		{ 0 },
129 		"video/x-mov",
130 		"Quicktime movie",
131 		"mov",
132 		"mov",
133 		{ 0 }
134 	},
135 	{
136 		media_file_format::B_READABLE
137 			| media_file_format::B_KNOWS_RAW_AUDIO
138 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
139 		{ 0 },
140 		B_MPEG_FORMAT_FAMILY,
141 		100,
142 		{ 0 },
143 		"audio/mpeg",
144 		"MPEG Layer 3",
145 		"mp3",
146 		"mp3",
147 		{ 0 }
148 	},
149 	{
150 		media_file_format::B_READABLE
151 			| media_file_format::B_KNOWS_ENCODED_VIDEO
152 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
153 		{ 0 },
154 		B_QUICKTIME_FORMAT_FAMILY,
155 		100,
156 		{ 0 },
157 		"video/mp4",
158 		"MPEG (Motion Picture Experts Group) format 4",
159 		"mp4",
160 		"mp4",
161 		{ 0 }
162 	},
163 	{
164 		media_file_format::B_WRITABLE | 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_MPEG_FORMAT_FAMILY,
169 		100,
170 		{ 0 },
171 		"video/mpeg",
172 		"MPEG (Motion Picture Experts Group)",
173 		"mpg",
174 		"mpg",
175 		{ 0 }
176 	},
177 	{
178 		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_AVI_FORMAT_FAMILY,
183 		100,
184 		{ 0 },
185 		"video/mpeg",
186 		"MPEG TS",
187 		"mpegts",
188 		"mpegts",
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_MPEG_FORMAT_FAMILY,
197 		100,
198 		{ 0 },
199 		"video/mpeg",
200 		"MPEG",
201 		"mpeg",
202 		"mpeg",
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_QUICKTIME_FORMAT_FAMILY,
211 		100,
212 		{ 0 },
213 		"video/nsv",
214 		"NSV (NullSoft Video file)",
215 		"nsv",
216 		"nsv",
217 		{ 0 }
218 	},
219 // TODO: This one rejects unknown codecs. We probably need to define
220 // a media_format_family for it so that Encoders can announce their support
221 // for it specifically.
222 	{
223 		media_file_format::B_WRITABLE | media_file_format::B_READABLE
224 			| media_file_format::B_KNOWS_ENCODED_VIDEO
225 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
226 		{ 0 },
227 		B_MISC_FORMAT_FAMILY,
228 		100,
229 		{ 0 },
230 		"audio/ogg",
231 		"Ogg (Xiph.Org Foundation)",
232 		"ogg",
233 		"ogg",
234 		{ 0 }
235 	},
236 	{
237 		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_AVI_FORMAT_FAMILY,
242 		100,
243 		{ 0 },
244 		"video/vnd.rn-realvideo",
245 		"RM (RealVideo clip)",
246 		"rm",
247 		"rm",
248 		{ 0 }
249 	},
250 	{
251 		media_file_format::B_READABLE
252 			| media_file_format::B_KNOWS_RAW_VIDEO
253 			| media_file_format::B_KNOWS_RAW_AUDIO
254 			| media_file_format::B_KNOWS_ENCODED_VIDEO
255 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
256 		{ 0 },
257 		B_QUICKTIME_FORMAT_FAMILY,
258 		100,
259 		{ 0 },
260 		"application/x-shockwave-flash",
261 		"Shockwave video",
262 		"swf",
263 		"swf",
264 		{ 0 }
265 	},
266 	{
267 		media_file_format::B_READABLE
268 			| media_file_format::B_KNOWS_ENCODED_VIDEO
269 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
270 		{ 0 },
271 		B_MPEG_FORMAT_FAMILY,
272 		100,
273 		{ 0 },
274 		"video/x-vob",
275 		"VOB movie",
276 		"vob",
277 		"vob",
278 		{ 0 }
279 	},
280 	{
281 		media_file_format::B_WRITABLE
282 			| media_file_format::B_KNOWS_ENCODED_AUDIO,
283 		{ 0 },
284 		B_WAV_FORMAT_FAMILY,
285 		100,
286 		{ 0 },
287 		"audio/wav",
288 		"WAV Format",
289 		"wav",
290 		"wav",
291 		{ 0 }
292 	},
293 };
294 
295 const size_t gMuxerCount = sizeof(gMuxerTable) / sizeof(media_file_format);
296 
297