changeset 903:68bc3ca12e79 libavformat

Put muxer-specific code parts in #ifdef CONFIG_MUXERS. based on a patch by Luca Abeni < lucabe72 #@# email #.# it >
author diego
date Thu, 19 Jan 2006 23:36:50 +0000
parents 5d1bcf01ce28
children 5d3dc3a6bbe7
files crc.c dv.c img2.c
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/crc.c	Thu Jan 19 22:30:37 2006 +0000
+++ b/crc.c	Thu Jan 19 23:36:50 2006 +0000
@@ -56,6 +56,7 @@
     }
     return (s2 << 16) | s1;
 }
+#ifdef CONFIG_MUXERS
 
 typedef struct CRCState {
     uint32_t crcval;
@@ -132,3 +133,4 @@
     av_register_output_format(&framecrc_format);
     return 0;
 }
+#endif /* CONFIG_MUXERS */
--- a/dv.c	Thu Jan 19 22:30:37 2006 +0000
+++ b/dv.c	Thu Jan 19 23:36:50 2006 +0000
@@ -907,6 +907,7 @@
     return 0;
 }
 
+#ifdef CONFIG_MUXERS
 static int dv_write_header(AVFormatContext *s)
 {
     s->priv_data = dv_init_mux(s);
@@ -944,6 +945,7 @@
     dv_delete_mux((DVMuxContext *)s->priv_data);
     return 0;
 }
+#endif /* CONFIG_MUXERS */
 
 static AVInputFormat dv_iformat = {
     "dv",
@@ -957,6 +959,7 @@
     .extensions = "dv,dif",
 };
 
+#ifdef CONFIG_MUXERS
 static AVOutputFormat dv_oformat = {
     "dv",
     "DV video format",
@@ -969,10 +972,13 @@
     dv_write_packet,
     dv_write_trailer,
 };
+#endif
 
 int ff_dv_init(void)
 {
     av_register_input_format(&dv_iformat);
+#ifdef CONFIG_MUXERS
     av_register_output_format(&dv_oformat);
+#endif
     return 0;
 }
--- a/img2.c	Thu Jan 19 22:30:37 2006 +0000
+++ b/img2.c	Thu Jan 19 23:36:50 2006 +0000
@@ -291,6 +291,7 @@
     return 0;
 }
 
+#ifdef CONFIG_MUXERS
 /******************************************************/
 /* image output */
 
@@ -360,6 +361,8 @@
     return 0;
 }
 
+#endif /* CONFIG_MUXERS */
+
 /* input */
 
 static AVInputFormat image2_iformat = {
@@ -387,6 +390,7 @@
 };
 
 
+#ifdef CONFIG_MUXERS
 /* output */
 
 static AVOutputFormat image2_oformat = {
@@ -415,14 +419,17 @@
     img_write_packet,
     img_write_trailer,
 };
+#endif /* CONFIG_MUXERS */
 
 int img2_init(void)
 {
     av_register_input_format(&image2_iformat);
-    av_register_output_format(&image2_oformat);
+    av_register_input_format(&image2pipe_iformat);
 
-    av_register_input_format(&image2pipe_iformat);
+#ifdef CONFIG_MUXERS
+    av_register_output_format(&image2_oformat);
     av_register_output_format(&image2pipe_oformat);
+#endif
 
     return 0;
 }