comparison img.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 8b53c0f3e7ad
comparison
equal deleted inserted replaced
1168:c894489e2abe 1169:d18cc9a1fd02
337 { 337 {
338 return 0; 338 return 0;
339 } 339 }
340 340
341 /* input */ 341 /* input */
342 342 #ifdef CONFIG_IMAGE_DEMUXER
343 static AVInputFormat image_demuxer = { 343 AVInputFormat image_demuxer = {
344 "image", 344 "image",
345 "image sequence", 345 "image sequence",
346 sizeof(VideoData), 346 sizeof(VideoData),
347 image_probe, 347 image_probe,
348 img_read_header, 348 img_read_header,
350 img_read_close, 350 img_read_close,
351 NULL, 351 NULL,
352 NULL, 352 NULL,
353 AVFMT_NOFILE | AVFMT_NEEDNUMBER, 353 AVFMT_NOFILE | AVFMT_NEEDNUMBER,
354 }; 354 };
355 355 #endif
356 static AVInputFormat imagepipe_demuxer = { 356 #ifdef CONFIG_IMAGEPIPE_DEMUXER
357 AVInputFormat imagepipe_demuxer = {
357 "imagepipe", 358 "imagepipe",
358 "piped image sequence", 359 "piped image sequence",
359 sizeof(VideoData), 360 sizeof(VideoData),
360 NULL, /* no probe */ 361 NULL, /* no probe */
361 img_read_header, 362 img_read_header,
362 img_read_packet, 363 img_read_packet,
363 img_read_close, 364 img_read_close,
364 NULL, 365 NULL,
365 }; 366 };
366 367 #endif
367 368
368 /* output */ 369 /* output */
369 370 #ifdef CONFIG_IMAGE_MUXER
370 static AVOutputFormat image_muxer = { 371 AVOutputFormat image_muxer = {
371 "image", 372 "image",
372 "image sequence", 373 "image sequence",
373 "", 374 "",
374 "", 375 "",
375 sizeof(VideoData), 376 sizeof(VideoData),
379 img_write_packet, 380 img_write_packet,
380 img_write_trailer, 381 img_write_trailer,
381 AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE, 382 AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
382 img_set_parameters, 383 img_set_parameters,
383 }; 384 };
384 385 #endif
385 static AVOutputFormat imagepipe_muxer = { 386 #ifdef CONFIG_IMAGEPIPE_MUXER
387 AVOutputFormat imagepipe_muxer = {
386 "imagepipe", 388 "imagepipe",
387 "piped image sequence", 389 "piped image sequence",
388 "", 390 "",
389 "", 391 "",
390 sizeof(VideoData), 392 sizeof(VideoData),
394 img_write_packet, 396 img_write_packet,
395 img_write_trailer, 397 img_write_trailer,
396 AVFMT_RAWPICTURE, 398 AVFMT_RAWPICTURE,
397 img_set_parameters, 399 img_set_parameters,
398 }; 400 };
399 401 #endif
400 int img_init(void)
401 {
402 av_register_input_format(&image_demuxer);
403 av_register_output_format(&image_muxer);
404
405 av_register_input_format(&imagepipe_demuxer);
406 av_register_output_format(&imagepipe_muxer);
407
408 return 0;
409 }