[FFmpeg-devel] enable/disable bitstream filters?

Jason Millard jsm174
Fri May 11 17:14:01 CEST 2007


I can't seem to get anything right by you guys. So I'm going to keep
going until I get this right.

Via GMail I always reply to the last message, so I'm guessing this
what your calling "top-posting". I just went to:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-May/thread.html

Now I can see how the thread was progressing.. From now on I'll reply
to the first message.

As for the mime types... If you don't attach files with extensions,
GMail messes up the MIME type. I'll force them to .txt

Are we good now?
-------------- next part --------------
--- /c/ffmpeg-051107-orig/libavcodec/allcodecs.c	Fri May 11 07:06:32 2007
+++ ./allcodecs.c	Fri May 11 09:46:34 2007
@@ -34,6 +34,9 @@
 
 #define REGISTER_PARSER(X,x) \
           if(ENABLE_##X##_PARSER)  av_register_codec_parser(&x##_parser)
+#define REGISTER_BSF(X,x) \
+          if(ENABLE_##X##_BSF)  av_register_bitstream_filter(&x##_bsf)
+
 
 /**
  * Register all the codecs, parsers and bitstream filters which were enabled at
@@ -273,12 +276,13 @@
     REGISTER_PARSER (PNM, pnm);
     REGISTER_PARSER (VC1, vc1);
 
-    av_register_bitstream_filter(&dump_extradata_bsf);
-    av_register_bitstream_filter(&remove_extradata_bsf);
-    av_register_bitstream_filter(&noise_bsf);
-    av_register_bitstream_filter(&mp3_header_compress_bsf);
-    av_register_bitstream_filter(&mp3_header_decompress_bsf);
-    av_register_bitstream_filter(&mjpega_dump_header_bsf);
-    av_register_bitstream_filter(&imx_dump_header_bsf);
+    /* bitstream filters */
+    REGISTER_BSF (DUMP_EXTRADATA, dump_extradata);
+    REGISTER_BSF (REMOVE_EXTRADATA, remove_extradata);
+    REGISTER_BSF (NOISE, noise);
+    REGISTER_BSF (MP3_HEADER_COMPRESS, mp3_header_compress);
+    REGISTER_BSF (MP3_HEADER_DECOMPRESS, mp3_header_decompress);
+    REGISTER_BSF (MJPEGA_DUMP_HEADER, mjpega_dump_header);
+    REGISTER_BSF (IMX_DUMP_HEADER, imx_dump_header);
 }
 
-------------- next part --------------
--- /c/ffmpeg-051107-orig/configure	Fri May 11 07:06:46 2007
+++ ./configure	Fri May 11 09:59:35 2007
@@ -158,6 +158,9 @@
   echo "  --enable-protocol=NAME   enables protocol NAME"
   echo "  --disable-protocol=NAME  disables protocol NAME"
   echo "  --disable-protocols      disables all protocols"
+  echo "  --enable-bsf=NAME        enables bitstream filter NAME"
+  echo "  --disable-bsf=NAME       disables bitstream filter NAME"
+  echo "  --disable-bsfs           disables all bitstream filters"
   echo
   echo "Developer options (useful when working on FFmpeg itself):"
   echo "  --enable-gprof           enable profiling with gprof [$gprof]"
@@ -554,6 +557,7 @@
     encoders
     decoders
     parsers
+    bsfs
     muxers
     demuxers
     audio_beos
@@ -910,8 +914,9 @@
 MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"`
 DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"`
 PROTOCOL_LIST=`sed -n 's/^[^#]*PROTOCOL.*, *\(.*\)).*/\1_protocol/p' "$source_path/libavformat/allformats.c"`
+BSF_LIST=`sed -n 's/^[^#]*BSF.*, *\(.*\)).*/\1_bsf/p' "$source_path/libavcodec/allcodecs.c"`
 
-enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST $PROTOCOL_LIST
+enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST $PROTOCOL_LIST $BSF_LIST
 
 die_unknown(){
     echo "Unknown option \"$1\"."
@@ -980,6 +985,8 @@
   ;;
   --disable-protocols) disable $PROTOCOL_LIST
   ;;
+  --disable-bsfs) disable $BSF_LIST
+  ;;
   --enable-*=*|--disable-*=*)
   eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
   case "$thing" in
@@ -1808,11 +1815,12 @@
 enabled_any $MUXER_LIST    && enable muxers
 enabled_any $DEMUXER_LIST  && enable demuxers
 enabled_any $PROTOCOL_LIST && enable protocols
+enabled_any $BSF_LIST      && enable bsfs
 
 enabled_any $THREADS_LIST  && enable threads
 
 check_deps $CONFIG_LIST $HAVE_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST \
-    $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST
+    $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST $BSF_LIST 
 
 enabled libogg    && append pkg_requires "ogg >= 1.1"
 enabled libtheora && append pkg_requires "theora"
@@ -2032,7 +2040,7 @@
 fi
 
 
-for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST; do
+for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST $BSF_LIST; do
     ucname="`toupper $part`"
     config_name="CONFIG_$ucname"
     enabled_name="ENABLE_$ucname"



More information about the ffmpeg-devel mailing list