comparison amr.c @ 1169:d18cc9a1fd02 libavformat

allow individual selection of muxers and demuxers
author mru
date Mon, 10 Jul 2006 21:14:37 +0000
parents d89d7ef290da
children 996ce2a68147
comparison
equal deleted inserted replaced
1168:c894489e2abe 1169:d18cc9a1fd02
213 static int amr_read_close(AVFormatContext *s) 213 static int amr_read_close(AVFormatContext *s)
214 { 214 {
215 return 0; 215 return 0;
216 } 216 }
217 217
218 static AVInputFormat amr_demuxer = { 218 #ifdef CONFIG_AMR_DEMUXER
219 AVInputFormat amr_demuxer = {
219 "amr", 220 "amr",
220 "3gpp amr file format", 221 "3gpp amr file format",
221 0, /*priv_data_size*/ 222 0, /*priv_data_size*/
222 amr_probe, 223 amr_probe,
223 amr_read_header, 224 amr_read_header,
224 amr_read_packet, 225 amr_read_packet,
225 amr_read_close, 226 amr_read_close,
226 }; 227 };
227 228 #endif
228 #ifdef CONFIG_MUXERS 229
229 static AVOutputFormat amr_muxer = { 230 #ifdef CONFIG_AMR_MUXER
231 AVOutputFormat amr_muxer = {
230 "amr", 232 "amr",
231 "3gpp amr file format", 233 "3gpp amr file format",
232 "audio/amr", 234 "audio/amr",
233 "amr", 235 "amr",
234 0, 236 0,
237 amr_write_header, 239 amr_write_header,
238 amr_write_packet, 240 amr_write_packet,
239 amr_write_trailer, 241 amr_write_trailer,
240 }; 242 };
241 #endif 243 #endif
242
243 int amr_init(void)
244 {
245 av_register_input_format(&amr_demuxer);
246 #ifdef CONFIG_MUXERS
247 av_register_output_format(&amr_muxer);
248 #endif
249 return 0;
250 }