diff 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
line wrap: on
line diff
--- a/img.c	Mon Jul 10 12:10:10 2006 +0000
+++ b/img.c	Mon Jul 10 21:14:37 2006 +0000
@@ -339,8 +339,8 @@
 }
 
 /* input */
-
-static AVInputFormat image_demuxer = {
+#ifdef CONFIG_IMAGE_DEMUXER
+AVInputFormat image_demuxer = {
     "image",
     "image sequence",
     sizeof(VideoData),
@@ -352,8 +352,9 @@
     NULL,
     AVFMT_NOFILE | AVFMT_NEEDNUMBER,
 };
-
-static AVInputFormat imagepipe_demuxer = {
+#endif
+#ifdef CONFIG_IMAGEPIPE_DEMUXER
+AVInputFormat imagepipe_demuxer = {
     "imagepipe",
     "piped image sequence",
     sizeof(VideoData),
@@ -363,11 +364,11 @@
     img_read_close,
     NULL,
 };
-
+#endif
 
 /* output */
-
-static AVOutputFormat image_muxer = {
+#ifdef CONFIG_IMAGE_MUXER
+AVOutputFormat image_muxer = {
     "image",
     "image sequence",
     "",
@@ -381,8 +382,9 @@
     AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
     img_set_parameters,
 };
-
-static AVOutputFormat imagepipe_muxer = {
+#endif
+#ifdef CONFIG_IMAGEPIPE_MUXER
+AVOutputFormat imagepipe_muxer = {
     "imagepipe",
     "piped image sequence",
     "",
@@ -396,14 +398,4 @@
     AVFMT_RAWPICTURE,
     img_set_parameters,
 };
-
-int img_init(void)
-{
-    av_register_input_format(&image_demuxer);
-    av_register_output_format(&image_muxer);
-
-    av_register_input_format(&imagepipe_demuxer);
-    av_register_output_format(&imagepipe_muxer);
-
-    return 0;
-}
+#endif