echo " --enable-parser=NAME enables parser NAME"
echo " --disable-parser=NAME disables parser NAME"
echo " --disable-parsers disables all parsers"
+ echo " --enable-bsf=NAME enables bitstream filter NAME"
+ echo " --disable-bsf=NAME disables bitstream filter NAME"
+ echo " --disable-bsfs disables all bitstream filters"
echo " --enable-protocol=NAME enables protocol NAME"
echo " --disable-protocol=NAME disables protocol NAME"
echo " --disable-protocols disables all protocols"
encoders
decoders
parsers
+ bsfs
muxers
demuxers
audio_beos
ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"`
DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"`
PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"`
+BSF_LIST=`sed -n 's/^[^#]*BSF.*, *\(.*\)).*/\1_bsf/p' "$source_path/libavcodec/allcodecs.c"`
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"`
-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\"."
;;
--disable-parsers) disable $PARSER_LIST
;;
+ --disable-bsfs) disable $BSF_LIST
+ ;;
--disable-protocols) disable $PROTOCOL_LIST
;;
--enable-*=*|--disable-*=*)
eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
case "$thing" in
- encoder|decoder|muxer|demuxer|parser|protocol) $action ${optval}_${thing} ;;
+ encoder|decoder|muxer|demuxer|parser|bsf|protocol) $action ${optval}_${thing} ;;
*) die_unknown "$opt" ;;
esac
;;
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
+ $BSF_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST
enabled libogg && append pkg_requires "ogg >= 1.1"
enabled libtheora && append pkg_requires "theora"
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 $BSF_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST; do
ucname="`toupper $part`"
config_name="CONFIG_$ucname"
enabled_name="ENABLE_$ucname"
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o
+OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += bitstream_filter.o
+OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += bitstream_filter.o
+OBJS-$(CONFIG_NOISE_BSF) += bitstream_filter.o
+OBJS-$(CONFIG_MP3_HEADER_COMPRESS_BSF) += bitstream_filter.o
+OBJS-$(CONFIG_MP3_HEADER_DECOMPRESS_BSF) += bitstream_filter.o
+OBJS-$(CONFIG_MJPEGA_DUMP_HEADER_BSF) += mjpeg.o
+OBJS-$(CONFIG_IMX_DUMP_HEADER_BSF) += mpeg12.o
+
OBJS-$(HAVE_PTHREADS) += pthread.o
OBJS-$(HAVE_W32THREADS) += w32thread.o
OBJS-$(HAVE_OS2THREADS) += os2thread.o
#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
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);
}
return 1;
}
+#ifdef CONFIG_DUMP_EXTRADATA_BSF
AVBitStreamFilter dump_extradata_bsf={
"dump_extra",
0,
dump_extradata,
};
+#endif
+#ifdef CONFIG_REMOVE_EXTRADATA_BSF
AVBitStreamFilter remove_extradata_bsf={
"remove_extra",
0,
remove_extradata,
};
+#endif
+#ifdef CONFIG_NOISE_BSF
AVBitStreamFilter noise_bsf={
"noise",
sizeof(int),
noise,
};
+#endif
+#ifdef CONFIG_MP3_HEADER_COMPRESS_BSF
AVBitStreamFilter mp3_header_compress_bsf={
"mp3comp",
0,
mp3_header_compress,
};
+#endif
+#ifdef CONFIG_MP3_HEADER_DECOMPRESS_BSF
AVBitStreamFilter mp3_header_decompress_bsf={
"mp3decomp",
0,
mp3_header_decompress,
};
+#endif
};
#endif
+#ifdef CONFIG_MJPEGA_DUMP_HEADER_BSF
AVBitStreamFilter mjpega_dump_header_bsf = {
"mjpegadump",
0,
mjpega_dump_header,
};
+#endif
#endif
+#ifdef CONFIG_IMX_DUMP_HEADER_BSF
static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe)
0,
imx_dump_header,
};
+#endif
/* this is ugly i know, but the alternative is too make
hundreds of vars global and prefix them with ff_mpeg1_