1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

allow individual selection of muxers and demuxers

Originally committed as revision 5707 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-07-10 21:14:37 +00:00
parent 4cac0d5589
commit ff70e60176
69 changed files with 837 additions and 964 deletions

26
configure vendored
View File

@ -104,7 +104,11 @@ show_help(){
echo " --enable-decoder=NAME enables decoder NAME" echo " --enable-decoder=NAME enables decoder NAME"
echo " --disable-encoders disables all encoders" echo " --disable-encoders disables all encoders"
echo " --disable-decoders disables all decoders" echo " --disable-decoders disables all decoders"
echo " --disable-muxer=NAME disables muxer NAME"
echo " --enable-muxer=NAME enables muxer NAME"
echo " --disable-muxers disables all muxers" echo " --disable-muxers disables all muxers"
echo " --disable-demuxer=NAME disables demuxer NAME"
echo " --enable-demuxer=NAME enables demuxer NAME"
echo " --disable-demuxers disables all demuxers" echo " --disable-demuxers disables all demuxers"
echo " --enable-parser=NAME enables parser NAME" echo " --enable-parser=NAME enables parser NAME"
echo " --disable-parser=NAME disables parser NAME" echo " --disable-parser=NAME disables parser NAME"
@ -458,8 +462,6 @@ sunmlib="no"
pthreads="no" pthreads="no"
gpl="no" gpl="no"
memalignhack="no" memalignhack="no"
muxers="yes"
demuxers="yes"
# OS specific # OS specific
targetos=`uname -s` targetos=`uname -s`
@ -662,6 +664,8 @@ done
CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'` CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'` PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
MUXER_LIST=`grep 'av_register_output_format(&[a-z]' $source_path/libavformat/allformats.c | sed 's/.*&\(.*\)).*/\1/'`
DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' $source_path/libavformat/allformats.c | sed 's/.*&\(.*\)).*/\1/'`
for opt do for opt do
case "$opt" in case "$opt" in
@ -819,9 +823,17 @@ for opt do
;; ;;
--disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`" --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
;; ;;
--disable-muxers) muxers="no"; ffserver="no" --enable-muxer=*) MUXER_LIST="$MUXER_LIST ${opt#*=}_muxer"
;; ;;
--disable-demuxers) demuxers="no" --disable-muxer=*) MUXER_LIST="`echo $MUXER_LIST | sed -e \"s#${opt#*=}_muxer##\"`"
;;
--disable-muxers) MUXER_LIST=""; ffserver="no"
;;
--enable-demuxer=*) DEMUXER_LIST="$DEMUXER_LIST ${opt#*=}_demuxer"
;;
--disable-demuxer=*) DEMUXER_LIST="`echo $DEMUXER_LIST | sed -e \"s#${opt#*=}_demuxer##\"`"
;;
--disable-demuxers) DEMUXER_LIST=""
;; ;;
--enable-parser=*) PARSER_LIST="$PARSER_LIST ${opt#*=}_parser" --enable-parser=*) PARSER_LIST="$PARSER_LIST ${opt#*=}_parser"
;; ;;
@ -1763,13 +1775,13 @@ if echo "$CODEC_LIST" | grep -q decoder; then
fi fi
# muxers # muxers
if test "$muxers" = "yes" ; then if echo "$MUXER_LIST" | grep -q muxer; then
echo "#define CONFIG_MUXERS 1" >> $TMPH echo "#define CONFIG_MUXERS 1" >> $TMPH
echo "CONFIG_MUXERS=yes" >> config.mak echo "CONFIG_MUXERS=yes" >> config.mak
fi fi
# demuxers # demuxers
if test "$demuxers" = "yes" ; then if echo "$DEMUXER_LIST" | grep -q demuxer; then
echo "#define CONFIG_DEMUXERS 1" >> $TMPH echo "#define CONFIG_DEMUXERS 1" >> $TMPH
echo "CONFIG_DEMUXERS=yes" >> config.mak echo "CONFIG_DEMUXERS=yes" >> config.mak
fi fi
@ -2091,7 +2103,7 @@ if test "$amr_if2" = "yes" ; then
fi fi
for codec in $CODEC_LIST $PARSER_LIST; do for codec in $CODEC_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
done done

View File

@ -318,7 +318,7 @@ static int fourxm_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat fourxm_demuxer = { AVInputFormat fourxm_demuxer = {
"4xm", "4xm",
"4X Technologies format", "4X Technologies format",
sizeof(FourxmDemuxContext), sizeof(FourxmDemuxContext),
@ -327,9 +327,3 @@ static AVInputFormat fourxm_demuxer = {
fourxm_read_packet, fourxm_read_packet,
fourxm_read_close, fourxm_read_close,
}; };
int fourxm_init(void)
{
av_register_input_format(&fourxm_demuxer);
return 0;
}

View File

@ -13,51 +13,148 @@ CPPOBJS=
HEADERS = avformat.h avio.h rtp.h rtsp.h rtspcodes.h HEADERS = avformat.h avio.h rtp.h rtsp.h rtspcodes.h
# demuxers # muxers/demuxers
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \ OBJS-$(CONFIG_FOURXM_DEMUXER) += 4xm.o
avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \ OBJS-$(CONFIG_ADTS_MUXER) += adtsenc.o
yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \ OBJS-$(CONFIG_AIFF_DEMUXER) += aiff.o
nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \ OBJS-$(CONFIG_AIFF_MUXER) += aiff.o
sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \ OBJS-$(CONFIG_AMR_DEMUXER) += amr.o
ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o aiff.o \ OBJS-$(CONFIG_AMR_MUXER) += amr.o
voc.o tta.o mm.o avs.o smacker.o nuv.o gxf.o oggparseogm.o OBJS-$(CONFIG_ASF_DEMUXER) += asf.o
OBJS-$(CONFIG_ASF_MUXER) += asf-enc.o
# muxers OBJS-$(CONFIG_ASF_STREAM_MUXER) += asf-enc.o
ifeq ($(CONFIG_MUXERS),yes) OBJS-$(CONFIG_AU_DEMUXER) += au.o
OBJS+= flvenc.o movenc.o asf-enc.o adtsenc.o OBJS-$(CONFIG_AU_MUXER) += au.o
endif OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o
OBJS-$(CONFIG_AVI_MUXER) += avienc.o
OBJS-$(CONFIG_AVS_DEMUXER) += avs.o
ifeq ($(AMR),yes) OBJS-$(CONFIG_CRC_MUXER) += crc.o
OBJS+= amr.o OBJS-$(CONFIG_FRAMECRC_MUXER) += crc.o
endif OBJS-$(CONFIG_DAUD_DEMUXER) += daud.o
OBJS-$(CONFIG_DV_DEMUXER) += dv.o
OBJS-$(CONFIG_DV_MUXER) += dv.o
OBJS-$(CONFIG_EA_DEMUXER) += electronicarts.o
OBJS-$(CONFIG_FFM_DEMUXER) += ffm.o
OBJS-$(CONFIG_FFM_MUXER) += ffm.o
OBJS-$(CONFIG_FLIC_DEMUXER) += flic.o
OBJS-$(CONFIG_FLV_DEMUXER) += flvdec.o
OBJS-$(CONFIG_FLV_MUXER) += flvenc.o
OBJS-$(CONFIG_GIF_MUXER) += gif.o
OBJS-$(CONFIG_GIF_DEMUXER) += gifdec.o
OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o
OBJS-$(CONFIG_IDCIN_DEMUXER) += idcin.o
OBJS-$(CONFIG_ROQ_DEMUXER) += idroq.o
OBJS-$(CONFIG_IMAGE2_DEMUXER) += img2.o
OBJS-$(CONFIG_IMAGE2PIPE_DEMUXER) += img2.o
OBJS-$(CONFIG_IMAGE2_MUXER) += img2.o
OBJS-$(CONFIG_IMAGE2PIPE_MUXER) += img2.o
OBJS-$(CONFIG_IMAGE_DEMUXER) += img.o
OBJS-$(CONFIG_IMAGEPIPE_DEMUXER) += img.o
OBJS-$(CONFIG_IMAGE_MUXER) += img.o
OBJS-$(CONFIG_IMAGEPIPE_MUXER) += img.o
OBJS-$(CONFIG_IPMOVIE_DEMUXER) += ipmovie.o
OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroska.o
OBJS-$(CONFIG_MM_DEMUXER) += mm.o
OBJS-$(CONFIG_MMF_DEMUXER) += mmf.o
OBJS-$(CONFIG_MMF_MUXER) += mmf.o
OBJS-$(CONFIG_MOV_DEMUXER) += mov.o
OBJS-$(CONFIG_MOV_MUXER) += movenc.o
OBJS-$(CONFIG_TGP_MUXER) += movenc.o
OBJS-$(CONFIG_MP4_MUXER) += movenc.o
OBJS-$(CONFIG_PSP_MUXER) += movenc.o
OBJS-$(CONFIG_TG2_MUXER) += movenc.o
OBJS-$(CONFIG_MP3_DEMUXER) += mp3.o
OBJS-$(CONFIG_MP2_MUXER) += mp3.o
OBJS-$(CONFIG_MP3_MUXER) += mp3.o
OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpeg.o
OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpeg.o
OBJS-$(CONFIG_MPEG2VOB_MUXER) += mpeg.o
OBJS-$(CONFIG_MPEG2SVCD_MUXER) += mpeg.o
OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpeg.o
OBJS-$(CONFIG_MPEGPS_DEMUXER) += mpeg.o
OBJS-$(CONFIG_MPEGTS_DEMUXER) += mpegts.o
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegtsenc.o
OBJS-$(CONFIG_MPJPEG_MUXER) += mpjpeg.o
OBJS-$(CONFIG_NSV_DEMUXER) += nsvdec.o
OBJS-$(CONFIG_NUT_DEMUXER) += nut.o
OBJS-$(CONFIG_NUT_MUXER) += nut.o
OBJS-$(CONFIG_NUV_DEMUXER) += nuv.o
OBJS-$(CONFIG_OGG_DEMUXER) += ogg2.o \
oggparsevorbis.o \
oggparsetheora.o \
oggparseflac.o \
oggparseogm.o
OBJS-$(CONFIG_STR_DEMUXER) += psxstr.o
OBJS-$(CONFIG_SHORTEN_DEMUXER) += raw.o
OBJS-$(CONFIG_FLAC_DEMUXER) += raw.o
OBJS-$(CONFIG_FLAC_MUXER) += raw.o
OBJS-$(CONFIG_AC3_DEMUXER) += raw.o
OBJS-$(CONFIG_AC3_MUXER) += raw.o
OBJS-$(CONFIG_DTS_DEMUXER) += raw.o
OBJS-$(CONFIG_AAC_DEMUXER) += raw.o
OBJS-$(CONFIG_H261_DEMUXER) += raw.o
OBJS-$(CONFIG_H261_MUXER) += raw.o
OBJS-$(CONFIG_H263_DEMUXER) += raw.o
OBJS-$(CONFIG_H263_MUXER) += raw.o
OBJS-$(CONFIG_M4V_DEMUXER) += raw.o
OBJS-$(CONFIG_M4V_MUXER) += raw.o
OBJS-$(CONFIG_H264_DEMUXER) += raw.o
OBJS-$(CONFIG_H264_MUXER) += raw.o
OBJS-$(CONFIG_MPEGVIDEO_DEMUXER) += raw.o
OBJS-$(CONFIG_MPEG1VIDEO_MUXER) += raw.o
OBJS-$(CONFIG_MPEG2VIDEO_MUXER) += raw.o
OBJS-$(CONFIG_MJPEG_DEMUXER) += raw.o
OBJS-$(CONFIG_INGENIENT_DEMUXER) += raw.o
OBJS-$(CONFIG_MJPEG_MUXER) += raw.o
OBJS-$(CONFIG_RAWVIDEO_DEMUXER) += raw.o
OBJS-$(CONFIG_RAWVIDEO_MUXER) += raw.o
OBJS-$(CONFIG_NULL_MUXER) += raw.o
OBJS-$(CONFIG_RM_DEMUXER) += rm.o
OBJS-$(CONFIG_RM_MUXER) += rm.o
OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o
OBJS-$(CONFIG_VMD_DEMUXER) += sierravmd.o
OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o
OBJS-$(CONFIG_SOL_DEMUXER) += sol.o
OBJS-$(CONFIG_SWF_DEMUXER) += swf.o
OBJS-$(CONFIG_SWF_MUXER) += swf.o
OBJS-$(CONFIG_TTA_DEMUXER) += tta.o
OBJS-$(CONFIG_VOC_DEMUXER) += voc.o
OBJS-$(CONFIG_VOC_MUXER) += voc.o
OBJS-$(CONFIG_WAV_DEMUXER) += wav.o
OBJS-$(CONFIG_WAV_MUXER) += wav.o
OBJS-$(CONFIG_WC3_DEMUXER) += wc3movie.o
OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood.o
OBJS-$(CONFIG_WSVQA_DEMUXER) += westwood.o
OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg.o
OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER) += yuv4mpeg.o
# image formats # image formats
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
OBJS+= framehook.o OBJS+= framehook.o
ifeq ($(CONFIG_VIDEO4LINUX),yes) ifeq ($(CONFIG_VIDEO4LINUX),yes)
OBJS+= grab.o OBJS-$(CONFIG_VIDEO_GRAB_DEVICE_DEMUXER) += grab.o
endif endif
ifeq ($(CONFIG_VIDEO4LINUX2),yes) ifeq ($(CONFIG_VIDEO4LINUX2),yes)
OBJS+= v4l2.o OBJS-$(CONFIG_V4L2_DEMUXER) += v4l2.o
endif endif
ifeq ($(CONFIG_BKTR),yes) ifeq ($(CONFIG_BKTR),yes)
OBJS+= grab_bktr.o OBJS-$(CONFIG_VIDEO_GRAB_DEVICE_DEMUXER) += grab_bktr.o
endif endif
ifeq ($(CONFIG_DV1394),yes) ifeq ($(CONFIG_DV1394),yes)
OBJS+= dv1394.o OBJS-$(CONFIG_DV1394_DEMUXER) += dv1394.o
endif endif
ifeq ($(CONFIG_DC1394),yes) ifeq ($(CONFIG_DC1394),yes)
OBJS+= dc1394.o OBJS-$(CONFIG_DC1394_DEMUXER) += dc1394.o
endif endif
ifeq ($(CONFIG_AUDIO_OSS),yes) ifeq ($(CONFIG_AUDIO_OSS),yes)
OBJS+= audio.o OBJS-$(CONFIG_AUDIO_DEMUXER) += audio.o
OBJS-$(CONFIG_AUDIO_MUXER) += audio.o
endif endif
EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) \ EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) \
@ -82,9 +179,11 @@ endif
endif endif
ifeq ($(CONFIG_LIBOGG),yes) ifeq ($(CONFIG_LIBOGG),yes)
OBJS+= ogg.o OBJS-$(CONFIG_OGG_MUXER) += ogg.o
endif endif
OBJS += $(OBJS-yes)
NAME=avformat NAME=avformat
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVFVERSION) LIBVERSION=$(LAVFVERSION)

View File

@ -107,7 +107,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0; return 0;
} }
static AVOutputFormat adts_muxer = { AVOutputFormat adts_muxer = {
"adts", "adts",
"ADTS AAC", "ADTS AAC",
"audio/aac", "audio/aac",
@ -119,9 +119,3 @@ static AVOutputFormat adts_muxer = {
adts_write_packet, adts_write_packet,
adts_write_trailer, adts_write_trailer,
}; };
int ff_adts_init(void)
{
av_register_output_format(&adts_muxer);
return 0;
}

View File

@ -428,8 +428,8 @@ static int aiff_read_seek(AVFormatContext *s,
return pcm_read_seek(s, stream_index, timestamp, flags); return pcm_read_seek(s, stream_index, timestamp, flags);
} }
#ifdef CONFIG_AIFF_DEMUXER
static AVInputFormat aiff_demuxer = { AVInputFormat aiff_demuxer = {
"aiff", "aiff",
"Audio IFF", "Audio IFF",
0, 0,
@ -439,9 +439,10 @@ static AVInputFormat aiff_demuxer = {
aiff_read_close, aiff_read_close,
aiff_read_seek, aiff_read_seek,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_AIFF_DEMUXER
static AVOutputFormat aiff_muxer = { AVOutputFormat aiff_muxer = {
"aiff", "aiff",
"Audio IFF", "Audio IFF",
"audio/aiff", "audio/aiff",
@ -453,14 +454,4 @@ static AVOutputFormat aiff_muxer = {
aiff_write_packet, aiff_write_packet,
aiff_write_trailer, aiff_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif
int ff_aiff_init(void)
{
av_register_input_format(&aiff_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&aiff_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -36,95 +36,381 @@ void av_register_all(void)
avcodec_init(); avcodec_init();
avcodec_register_all(); avcodec_register_all();
mpegps_init(); #ifdef CONFIG_FOURXM_DEMUXER
mpegts_init(); av_register_input_format(&fourxm_demuxer);
#ifdef CONFIG_MUXERS
crc_init();
img_init();
img2_init();
#endif //CONFIG_MUXERS
raw_init();
mp3_init();
rm_init();
asf_init();
#ifdef CONFIG_MUXERS
avienc_init();
#endif //CONFIG_MUXERS
avidec_init();
ff_wav_init();
ff_mmf_init();
swf_init();
au_init();
ff_aiff_init();
#ifdef CONFIG_MUXERS
ff_adts_init();
gif_init();
#endif //CONFIG_MUXERS
mov_init();
#ifdef CONFIG_MUXERS
movenc_init();
jpeg_init();
#endif //CONFIG_MUXERS
ff_dv_init();
fourxm_init();
#ifdef CONFIG_MUXERS
flvenc_init();
#endif //CONFIG_MUXERS
flvdec_init();
str_init();
roq_init();
ipmovie_init();
wc3_init();
westwood_init();
film_init();
idcin_init();
flic_init();
vmd_init();
mm_init();
smacker_init();
#if defined(AMR_NB) || defined(AMR_NB_FIXED) || defined(AMR_WB)
amr_init();
#endif #endif
yuv4mpeg_init(); #ifdef CONFIG_ADTS_MUXER
av_register_output_format(&adts_muxer);
ogg_init();
#ifdef CONFIG_LIBOGG
libogg_init();
#endif #endif
#ifdef CONFIG_AIFF_DEMUXER
ffm_init(); av_register_input_format(&aiff_demuxer);
#if defined(CONFIG_VIDEO4LINUX2)
v4l2_init();
#endif #endif
#if defined(CONFIG_VIDEO4LINUX) || defined(CONFIG_BKTR) #ifdef CONFIG_AIFF_MUXER
video_grab_init(); av_register_output_format(&aiff_muxer);
#endif
#ifdef CONFIG_AMR_DEMUXER
av_register_input_format(&amr_demuxer);
#endif
#ifdef CONFIG_AMR_MUXER
av_register_output_format(&amr_muxer);
#endif
#ifdef CONFIG_ASF_DEMUXER
av_register_input_format(&asf_demuxer);
#endif
#ifdef CONFIG_ASF_MUXER
av_register_output_format(&asf_muxer);
#endif
#ifdef CONFIG_ASF_STREAM_MUXER
av_register_output_format(&asf_stream_muxer);
#endif
#ifdef CONFIG_AU_DEMUXER
av_register_input_format(&au_demuxer);
#endif
#ifdef CONFIG_AU_MUXER
av_register_output_format(&au_muxer);
#endif #endif
#if defined(CONFIG_AUDIO_OSS) || defined(CONFIG_AUDIO_BEOS) #if defined(CONFIG_AUDIO_OSS) || defined(CONFIG_AUDIO_BEOS)
audio_init(); #ifdef CONFIG_AUDIO_DEMUXER
av_register_input_format(&audio_demuxer);
#endif #endif
#ifdef CONFIG_AUDIO_MUXER
#ifdef CONFIG_DV1394 av_register_output_format(&audio_muxer);
dv1394_init(); #endif
#endif /* CONFIG_AUDIO_OSS || CONFIG_AUDIO_BEOS */
#ifdef CONFIG_AVI_DEMUXER
av_register_input_format(&avi_demuxer);
#endif
#ifdef CONFIG_AVI_MUXER
av_register_output_format(&avi_muxer);
#endif
#ifdef CONFIG_AVS_DEMUXER
av_register_input_format(&avs_demuxer);
#endif
#ifdef CONFIG_CRC_MUXER
av_register_output_format(&crc_muxer);
#endif
#ifdef CONFIG_FRAMECRC_MUXER
av_register_output_format(&framecrc_muxer);
#endif
#ifdef CONFIG_DAUD_DEMUXER
av_register_input_format(&daud_demuxer);
#endif #endif
#ifdef CONFIG_DC1394 #ifdef CONFIG_DC1394
dc1394_init(); #ifdef CONFIG_DC1394_DEMUXER
av_register_input_format(&dc1394_demuxer);
#endif
#endif /* CONFIG_DC1394 */
#ifdef CONFIG_DV1394
#ifdef CONFIG_DV1394_DEMUXER
av_register_input_format(&dv1394_demuxer);
#endif
#endif /* CONFIG_DV1394 */
#ifdef CONFIG_DV_DEMUXER
av_register_input_format(&dv_demuxer);
#endif
#ifdef CONFIG_DV_MUXER
av_register_output_format(&dv_muxer);
#endif
#ifdef CONFIG_EA_DEMUXER
av_register_input_format(&ea_demuxer);
#endif
#ifdef CONFIG_FFM_DEMUXER
av_register_input_format(&ffm_demuxer);
#endif
#ifdef CONFIG_FFM_MUXER
av_register_output_format(&ffm_muxer);
#endif
#ifdef CONFIG_FLIC_DEMUXER
av_register_input_format(&flic_demuxer);
#endif
#ifdef CONFIG_FLV_DEMUXER
av_register_input_format(&flv_demuxer);
#endif
#ifdef CONFIG_FLV_MUXER
av_register_output_format(&flv_muxer);
#endif
#ifdef CONFIG_GIF_MUXER
av_register_output_format(&gif_muxer);
#endif
#ifdef CONFIG_GIF_DEMUXER
av_register_input_format(&gif_demuxer);
#endif
#ifdef CONFIG_GXF_DEMUXER
av_register_input_format(&gxf_demuxer);
#endif
#ifdef CONFIG_IDCIN_DEMUXER
av_register_input_format(&idcin_demuxer);
#endif
#ifdef CONFIG_ROQ_DEMUXER
av_register_input_format(&roq_demuxer);
#endif
#ifdef CONFIG_IMAGE2_DEMUXER
av_register_input_format(&image2_demuxer);
#endif
#ifdef CONFIG_IMAGE2PIPE_DEMUXER
av_register_input_format(&image2pipe_demuxer);
#endif
#ifdef CONFIG_IMAGE2_MUXER
av_register_output_format(&image2_muxer);
#endif
#ifdef CONFIG_IMAGE2PIPE_MUXER
av_register_output_format(&image2pipe_muxer);
#endif
#ifdef CONFIG_IMAGE_DEMUXER
av_register_input_format(&image_demuxer);
#endif
#ifdef CONFIG_IMAGEPIPE_DEMUXER
av_register_input_format(&imagepipe_demuxer);
#endif
#ifdef CONFIG_IMAGE_MUXER
av_register_output_format(&image_muxer);
#endif
#ifdef CONFIG_IMAGEPIPE_MUXER
av_register_output_format(&imagepipe_muxer);
#endif
#ifdef CONFIG_IPMOVIE_DEMUXER
av_register_input_format(&ipmovie_demuxer);
#endif
#ifdef CONFIG_MATROSKA_DEMUXER
av_register_input_format(&matroska_demuxer);
#endif
#ifdef CONFIG_MM_DEMUXER
av_register_input_format(&mm_demuxer);
#endif
#ifdef CONFIG_MMF_DEMUXER
av_register_input_format(&mmf_demuxer);
#endif
#ifdef CONFIG_MMF_MUXER
av_register_output_format(&mmf_muxer);
#endif
#ifdef CONFIG_MOV_DEMUXER
av_register_input_format(&mov_demuxer);
#endif
#ifdef CONFIG_MOV_MUXER
av_register_output_format(&mov_muxer);
#endif
#ifdef CONFIG_TGP_MUXER
av_register_output_format(&tgp_muxer);
#endif
#ifdef CONFIG_MP4_MUXER
av_register_output_format(&mp4_muxer);
#endif
#ifdef CONFIG_PSP_MUXER
av_register_output_format(&psp_muxer);
#endif
#ifdef CONFIG_TG2_MUXER
av_register_output_format(&tg2_muxer);
#endif
#ifdef CONFIG_MP3_DEMUXER
av_register_input_format(&mp3_demuxer);
#endif
#ifdef CONFIG_MP2_MUXER
av_register_output_format(&mp2_muxer);
#endif
#ifdef CONFIG_MP3_MUXER
av_register_output_format(&mp3_muxer);
#endif
#ifdef CONFIG_MPEG1SYSTEM_MUXER
av_register_output_format(&mpeg1system_muxer);
#endif
#ifdef CONFIG_MPEG1VCD_MUXER
av_register_output_format(&mpeg1vcd_muxer);
#endif
#ifdef CONFIG_MPEG2VOB_MUXER
av_register_output_format(&mpeg2vob_muxer);
#endif
#ifdef CONFIG_MPEG2SVCD_MUXER
av_register_output_format(&mpeg2svcd_muxer);
#endif
#ifdef CONFIG_MPEG2DVD_MUXER
av_register_output_format(&mpeg2dvd_muxer);
#endif
#ifdef CONFIG_MPEGPS_DEMUXER
av_register_input_format(&mpegps_demuxer);
#endif
#ifdef CONFIG_MPEGTS_DEMUXER
av_register_input_format(&mpegts_demuxer);
#endif
#ifdef CONFIG_MPEGTS_MUXER
av_register_output_format(&mpegts_muxer);
#endif
#ifdef CONFIG_MPJPEG_MUXER
av_register_output_format(&mpjpeg_muxer);
#endif
#ifdef CONFIG_NSV_DEMUXER
av_register_input_format(&nsv_demuxer);
#endif
#ifdef CONFIG_NUT_DEMUXER
av_register_input_format(&nut_demuxer);
#endif
#ifdef CONFIG_NUT_MUXER
av_register_output_format(&nut_muxer);
#endif
#ifdef CONFIG_NUV_DEMUXER
av_register_input_format(&nuv_demuxer);
#endif
#ifdef CONFIG_OGG_DEMUXER
av_register_input_format(&ogg_demuxer);
#endif
#ifdef CONFIG_LIBOGG
#ifdef CONFIG_OGG_MUXER
av_register_output_format(&ogg_muxer);
#endif
#endif /* CONFIG_LIBOGG */
#ifdef CONFIG_STR_DEMUXER
av_register_input_format(&str_demuxer);
#endif
#ifdef CONFIG_SHORTEN_DEMUXER
av_register_input_format(&shorten_demuxer);
#endif
#ifdef CONFIG_FLAC_DEMUXER
av_register_input_format(&flac_demuxer);
#endif
#ifdef CONFIG_FLAC_MUXER
av_register_output_format(&flac_muxer);
#endif
#ifdef CONFIG_AC3_DEMUXER
av_register_input_format(&ac3_demuxer);
#endif
#ifdef CONFIG_AC3_MUXER
av_register_output_format(&ac3_muxer);
#endif
#ifdef CONFIG_DTS_DEMUXER
av_register_input_format(&dts_demuxer);
#endif
#ifdef CONFIG_AAC_DEMUXER
av_register_input_format(&aac_demuxer);
#endif
#ifdef CONFIG_H261_DEMUXER
av_register_input_format(&h261_demuxer);
#endif
#ifdef CONFIG_H261_MUXER
av_register_output_format(&h261_muxer);
#endif
#ifdef CONFIG_H263_DEMUXER
av_register_input_format(&h263_demuxer);
#endif
#ifdef CONFIG_H263_MUXER
av_register_output_format(&h263_muxer);
#endif
#ifdef CONFIG_M4V_DEMUXER
av_register_input_format(&m4v_demuxer);
#endif
#ifdef CONFIG_M4V_MUXER
av_register_output_format(&m4v_muxer);
#endif
#ifdef CONFIG_H264_DEMUXER
av_register_input_format(&h264_demuxer);
#endif
#ifdef CONFIG_H264_MUXER
av_register_output_format(&h264_muxer);
#endif
#ifdef CONFIG_MPEGVIDEO_DEMUXER
av_register_input_format(&mpegvideo_demuxer);
#endif
#ifdef CONFIG_MPEG1VIDEO_MUXER
av_register_output_format(&mpeg1video_muxer);
#endif
#ifdef CONFIG_MPEG2VIDEO_MUXER
av_register_output_format(&mpeg2video_muxer);
#endif
#ifdef CONFIG_MJPEG_DEMUXER
av_register_input_format(&mjpeg_demuxer);
#endif
#ifdef CONFIG_INGENIENT_DEMUXER
av_register_input_format(&ingenient_demuxer);
#endif
#ifdef CONFIG_MJPEG_MUXER
av_register_output_format(&mjpeg_muxer);
#endif
#ifdef CONFIG_RAWVIDEO_DEMUXER
av_register_input_format(&rawvideo_demuxer);
#endif
#ifdef CONFIG_RAWVIDEO_MUXER
av_register_output_format(&rawvideo_muxer);
#endif
#ifdef CONFIG_NULL_MUXER
av_register_output_format(&null_muxer);
#endif
#ifdef CONFIG_RM_DEMUXER
av_register_input_format(&rm_demuxer);
#endif
#ifdef CONFIG_RM_MUXER
av_register_output_format(&rm_muxer);
#endif
#ifdef CONFIG_NETWORK
#ifdef CONFIG_RTP_MUXER
av_register_output_format(&rtp_muxer);
#endif
#ifdef CONFIG_RTSP_DEMUXER
av_register_input_format(&rtsp_demuxer);
#endif
#ifdef CONFIG_SDP_DEMUXER
av_register_input_format(&sdp_demuxer);
#endif
#ifdef CONFIG_REDIR_DEMUXER
av_register_input_format(&redir_demuxer);
#endif
#endif /* CONFIG_NETWORK */
#ifdef CONFIG_SEGAFILM_DEMUXER
av_register_input_format(&segafilm_demuxer);
#endif
#ifdef CONFIG_VMD_DEMUXER
av_register_input_format(&vmd_demuxer);
#endif
#ifdef CONFIG_SMACKER_DEMUXER
av_register_input_format(&smacker_demuxer);
#endif
#ifdef CONFIG_SOL_DEMUXER
av_register_input_format(&sol_demuxer);
#endif
#ifdef CONFIG_SWF_DEMUXER
av_register_input_format(&swf_demuxer);
#endif
#ifdef CONFIG_SWF_MUXER
av_register_output_format(&swf_muxer);
#endif
#ifdef CONFIG_TTA_DEMUXER
av_register_input_format(&tta_demuxer);
#endif
#ifdef CONFIG_VIDEO4LINUX2
#ifdef CONFIG_V4L2_DEMUXER
av_register_input_format(&v4l2_demuxer);
#endif
#endif /* CONFIG_VIDEO4LINUX2 */
#if defined(CONFIG_VIDEO4LINUX) || defined(CONFIG_BKTR)
#ifdef CONFIG_VIDEO_GRAB_DEVICE_DEMUXER
av_register_input_format(&video_grab_device_demuxer);
#endif
#endif /* CONFIG_VIDEO4LINUX || CONFIG_BKTR */
#ifdef CONFIG_VOC_DEMUXER
av_register_input_format(&voc_demuxer);
#endif
#ifdef CONFIG_VOC_MUXER
av_register_output_format(&voc_muxer);
#endif
#ifdef CONFIG_WAV_DEMUXER
av_register_input_format(&wav_demuxer);
#endif
#ifdef CONFIG_WAV_MUXER
av_register_output_format(&wav_muxer);
#endif
#ifdef CONFIG_WC3_DEMUXER
av_register_input_format(&wc3_demuxer);
#endif
#ifdef CONFIG_WSAUD_DEMUXER
av_register_input_format(&wsaud_demuxer);
#endif
#ifdef CONFIG_WSVQA_DEMUXER
av_register_input_format(&wsvqa_demuxer);
#endif
#ifdef CONFIG_YUV4MPEGPIPE_MUXER
av_register_output_format(&yuv4mpegpipe_muxer);
#endif
#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
av_register_input_format(&yuv4mpegpipe_demuxer);
#endif #endif
nut_init();
matroska_init();
sol_init();
ea_init();
nsvdec_init();
daud_init();
voc_init();
tta_init();
avs_init();
nuv_init();
gxf_init();
#ifdef CONFIG_MUXERS
/* image formats */ /* image formats */
#if 0 #if 0
av_register_image_format(&pnm_image_format); av_register_image_format(&pnm_image_format);
@ -141,15 +427,12 @@ void av_register_all(void)
#endif #endif
av_register_image_format(&gif_image_format); av_register_image_format(&gif_image_format);
// av_register_image_format(&sgi_image_format); heap corruption, dont enable // av_register_image_format(&sgi_image_format); heap corruption, dont enable
#endif //CONFIG_MUXERS
#ifdef CONFIG_PROTOCOLS #ifdef CONFIG_PROTOCOLS
/* file protocols */ /* file protocols */
register_protocol(&file_protocol); register_protocol(&file_protocol);
register_protocol(&pipe_protocol); register_protocol(&pipe_protocol);
#ifdef CONFIG_NETWORK #ifdef CONFIG_NETWORK
rtsp_init();
rtp_init();
register_protocol(&udp_protocol); register_protocol(&udp_protocol);
register_protocol(&rtp_protocol); register_protocol(&rtp_protocol);
register_protocol(&tcp_protocol); register_protocol(&tcp_protocol);

View File

@ -1,173 +1,135 @@
#ifndef ALLFORMATS_H #ifndef ALLFORMATS_H
#define ALLFORMATS_H #define ALLFORMATS_H
/* mpeg.c */ extern AVInputFormat fourxm_demuxer;
extern AVOutputFormat adts_muxer;
extern AVInputFormat aiff_demuxer;
extern AVOutputFormat aiff_muxer;
extern AVInputFormat amr_demuxer;
extern AVOutputFormat amr_muxer;
extern AVInputFormat asf_demuxer;
extern AVOutputFormat asf_muxer;
extern AVOutputFormat asf_stream_muxer;
extern AVInputFormat au_demuxer;
extern AVOutputFormat au_muxer;
extern AVInputFormat audio_demuxer;
extern AVOutputFormat audio_muxer;
extern AVInputFormat avi_demuxer;
extern AVOutputFormat avi_muxer;
extern AVInputFormat avs_demuxer;
extern AVOutputFormat crc_muxer;
extern AVOutputFormat framecrc_muxer;
extern AVInputFormat daud_demuxer;
extern AVInputFormat dc1394_demuxer;
extern AVInputFormat dv1394_demuxer;
extern AVInputFormat dv_demuxer;
extern AVOutputFormat dv_muxer;
extern AVInputFormat ea_demuxer;
extern AVInputFormat ffm_demuxer;
extern AVOutputFormat ffm_muxer;
extern AVInputFormat flic_demuxer;
extern AVInputFormat flv_demuxer;
extern AVOutputFormat flv_muxer;
extern AVOutputFormat gif_muxer;
extern AVInputFormat gif_demuxer;
extern AVInputFormat video_grab_device_demuxer;
extern AVInputFormat video_grab_device_demuxer;
extern AVInputFormat gxf_demuxer;
extern AVInputFormat idcin_demuxer;
extern AVInputFormat roq_demuxer;
extern AVInputFormat image2_demuxer;
extern AVInputFormat image2pipe_demuxer;
extern AVOutputFormat image2_muxer;
extern AVOutputFormat image2pipe_muxer;
extern AVInputFormat image_demuxer;
extern AVInputFormat imagepipe_demuxer;
extern AVOutputFormat image_muxer;
extern AVOutputFormat imagepipe_muxer;
extern AVInputFormat ipmovie_demuxer;
extern AVInputFormat matroska_demuxer;
extern AVInputFormat mm_demuxer;
extern AVInputFormat mmf_demuxer;
extern AVOutputFormat mmf_muxer;
extern AVInputFormat mov_demuxer;
extern AVOutputFormat mov_muxer;
extern AVOutputFormat tgp_muxer;
extern AVOutputFormat mp4_muxer;
extern AVOutputFormat psp_muxer;
extern AVOutputFormat tg2_muxer;
extern AVInputFormat mp3_demuxer;
extern AVOutputFormat mp2_muxer;
extern AVOutputFormat mp3_muxer;
extern AVOutputFormat mpeg1system_muxer;
extern AVOutputFormat mpeg1vcd_muxer;
extern AVOutputFormat mpeg2vob_muxer;
extern AVOutputFormat mpeg2svcd_muxer;
extern AVOutputFormat mpeg2dvd_muxer;
extern AVInputFormat mpegps_demuxer; extern AVInputFormat mpegps_demuxer;
int mpegps_init(void);
/* mpegts.c */
extern AVInputFormat mpegts_demuxer; extern AVInputFormat mpegts_demuxer;
int mpegts_init(void); extern AVOutputFormat mpegts_muxer;
extern AVOutputFormat mpjpeg_muxer;
/* rm.c */ extern AVInputFormat nsv_demuxer;
int rm_init(void); extern AVInputFormat nut_demuxer;
extern AVOutputFormat nut_muxer;
/* crc.c */ extern AVInputFormat nuv_demuxer;
int crc_init(void); extern AVInputFormat ogg_demuxer;
extern AVOutputFormat ogg_muxer;
/* img.c */ extern AVInputFormat str_demuxer;
int img_init(void); extern AVInputFormat shorten_demuxer;
extern AVInputFormat flac_demuxer;
/* img2.c */ extern AVOutputFormat flac_muxer;
int img2_init(void); extern AVInputFormat ac3_demuxer;
extern AVOutputFormat ac3_muxer;
/* asf.c */ extern AVInputFormat dts_demuxer;
int asf_init(void); extern AVInputFormat aac_demuxer;
extern AVInputFormat h261_demuxer;
/* avienc.c */ extern AVOutputFormat h261_muxer;
int avienc_init(void); extern AVInputFormat h263_demuxer;
extern AVOutputFormat h263_muxer;
/* avidec.c */ extern AVInputFormat m4v_demuxer;
int avidec_init(void); extern AVOutputFormat m4v_muxer;
extern AVInputFormat h264_demuxer;
/* swf.c */ extern AVOutputFormat h264_muxer;
int swf_init(void); extern AVInputFormat mpegvideo_demuxer;
extern AVOutputFormat mpeg1video_muxer;
/* mov.c */ extern AVOutputFormat mpeg2video_muxer;
int mov_init(void); extern AVInputFormat mjpeg_demuxer;
extern AVInputFormat ingenient_demuxer;
/* movenc.c */ extern AVOutputFormat mjpeg_muxer;
int movenc_init(void); extern AVInputFormat rawvideo_demuxer;
extern AVOutputFormat rawvideo_muxer;
/* flvenc.c */ extern AVOutputFormat null_muxer;
int flvenc_init(void); extern AVInputFormat rm_demuxer;
extern AVOutputFormat rm_muxer;
/* flvdec.c */ extern AVOutputFormat rtp_muxer;
int flvdec_init(void); extern AVInputFormat rtsp_demuxer;
extern AVInputFormat sdp_demuxer;
/* jpeg.c */ extern AVInputFormat redir_demuxer;
int jpeg_init(void); extern AVInputFormat segafilm_demuxer;
extern AVInputFormat vmd_demuxer;
/* gif.c */ extern AVInputFormat smacker_demuxer;
int gif_init(void); extern AVInputFormat sol_demuxer;
extern AVInputFormat swf_demuxer;
/* au.c */ extern AVOutputFormat swf_muxer;
int au_init(void); extern AVInputFormat tta_demuxer;
extern AVInputFormat v4l2_demuxer;
/* amr.c */ extern AVInputFormat voc_demuxer;
int amr_init(void); extern AVOutputFormat voc_muxer;
extern AVInputFormat wav_demuxer;
/* wav.c */ extern AVOutputFormat wav_muxer;
int ff_wav_init(void); extern AVInputFormat wc3_demuxer;
extern AVInputFormat wsaud_demuxer;
/* mmf.c */ extern AVInputFormat wsvqa_demuxer;
int ff_mmf_init(void); extern AVOutputFormat yuv4mpegpipe_muxer;
extern AVInputFormat yuv4mpegpipe_demuxer;
/* raw.c */ /* raw.c */
int pcm_read_seek(AVFormatContext *s, int pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags); int stream_index, int64_t timestamp, int flags);
int raw_init(void);
/* mp3.c */
int mp3_init(void);
/* yuv4mpeg.c */
int yuv4mpeg_init(void);
/* ogg2.c */
int ogg_init(void);
/* ogg.c */
int libogg_init(void);
/* dv.c */
int ff_dv_init(void);
/* ffm.c */
int ffm_init(void);
/* rtsp.c */ /* rtsp.c */
extern AVInputFormat redir_demuxer;
int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f); int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f);
/* 4xm.c */
int fourxm_init(void);
/* psxstr.c */
int str_init(void);
/* idroq.c */
int roq_init(void);
/* ipmovie.c */
int ipmovie_init(void);
/* nut.c */
int nut_init(void);
/* wc3movie.c */
int wc3_init(void);
/* westwood.c */
int westwood_init(void);
/* segafilm.c */
int film_init(void);
/* idcin.c */
int idcin_init(void);
/* flic.c */
int flic_init(void);
/* sierravmd.c */
int vmd_init(void);
/* matroska.c */
int matroska_init(void);
/* sol.c */
int sol_init(void);
/* electronicarts.c */
int ea_init(void);
/* nsvdec.c */
int nsvdec_init(void);
/* daud.c */
int daud_init(void);
/* nuv.c */
int nuv_init(void);
/* gxf.c */
int gxf_init(void);
/* aiff.c */
int ff_aiff_init(void);
/* voc.c */
int voc_init(void);
/* tta.c */
int tta_init(void);
/* adts.c */
int ff_adts_init(void);
/* mm.c */
int mm_init(void);
/* avs.c */
int avs_init(void);
/* smacker.c */
int smacker_init(void);
/* v4l2.c */
int v4l2_init(void);
#if 0 #if 0
extern AVImageFormat pnm_image_format; extern AVImageFormat pnm_image_format;
extern AVImageFormat pbm_image_format; extern AVImageFormat pbm_image_format;

View File

@ -215,7 +215,8 @@ static int amr_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat amr_demuxer = { #ifdef CONFIG_AMR_DEMUXER
AVInputFormat amr_demuxer = {
"amr", "amr",
"3gpp amr file format", "3gpp amr file format",
0, /*priv_data_size*/ 0, /*priv_data_size*/
@ -224,9 +225,10 @@ static AVInputFormat amr_demuxer = {
amr_read_packet, amr_read_packet,
amr_read_close, amr_read_close,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_AMR_MUXER
static AVOutputFormat amr_muxer = { AVOutputFormat amr_muxer = {
"amr", "amr",
"3gpp amr file format", "3gpp amr file format",
"audio/amr", "audio/amr",
@ -239,12 +241,3 @@ static AVOutputFormat amr_muxer = {
amr_write_trailer, amr_write_trailer,
}; };
#endif #endif
int amr_init(void)
{
av_register_input_format(&amr_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&amr_muxer);
#endif
return 0;
}

View File

@ -23,8 +23,6 @@
#undef NDEBUG #undef NDEBUG
#include <assert.h> #include <assert.h>
#ifdef CONFIG_MUXERS
#define ASF_INDEXED_INTERVAL 10000000 #define ASF_INDEXED_INTERVAL 10000000
#define ASF_INDEX_BLOCK 600 #define ASF_INDEX_BLOCK 600
@ -823,6 +821,7 @@ static int asf_write_trailer(AVFormatContext *s)
return 0; return 0;
} }
#ifdef CONFIG_ASF_MUXER
AVOutputFormat asf_muxer = { AVOutputFormat asf_muxer = {
"asf", "asf",
"asf format", "asf format",
@ -840,7 +839,9 @@ AVOutputFormat asf_muxer = {
asf_write_trailer, asf_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
#ifdef CONFIG_ASF_STREAM_MUXER
AVOutputFormat asf_stream_muxer = { AVOutputFormat asf_stream_muxer = {
"asf_stream", "asf_stream",
"asf format", "asf format",
@ -858,4 +859,4 @@ AVOutputFormat asf_stream_muxer = {
asf_write_trailer, asf_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_ASF_STREAM_MUXER

View File

@ -840,7 +840,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
return 0; return 0;
} }
static AVInputFormat asf_demuxer = { AVInputFormat asf_demuxer = {
"asf", "asf",
"asf format", "asf format",
sizeof(ASFContext), sizeof(ASFContext),
@ -851,18 +851,3 @@ static AVInputFormat asf_demuxer = {
asf_read_seek, asf_read_seek,
asf_read_pts, asf_read_pts,
}; };
#ifdef CONFIG_MUXERS
extern AVOutputFormat asf_muxer;
extern AVOutputFormat asf_stream_muxer;
#endif //CONFIG_MUXERS
int asf_init(void)
{
av_register_input_format(&asf_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&asf_muxer);
av_register_output_format(&asf_stream_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -178,7 +178,8 @@ static int au_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat au_demuxer = { #ifdef CONFIG_AU_DEMUXER
AVInputFormat au_demuxer = {
"au", "au",
"SUN AU Format", "SUN AU Format",
0, 0,
@ -188,9 +189,10 @@ static AVInputFormat au_demuxer = {
au_read_close, au_read_close,
pcm_read_seek, pcm_read_seek,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_AU_MUXER
static AVOutputFormat au_muxer = { AVOutputFormat au_muxer = {
"au", "au",
"SUN AU Format", "SUN AU Format",
"audio/basic", "audio/basic",
@ -202,13 +204,4 @@ static AVOutputFormat au_muxer = {
au_write_packet, au_write_packet,
au_write_trailer, au_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_AU_MUXER
int au_init(void)
{
av_register_input_format(&au_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&au_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -313,7 +313,8 @@ static int audio_read_close(AVFormatContext *s1)
return 0; return 0;
} }
static AVInputFormat audio_demuxer = { #ifdef CONFIG_AUDIO_DEMUXER
AVInputFormat audio_demuxer = {
"audio_device", "audio_device",
"audio grab and output", "audio grab and output",
sizeof(AudioData), sizeof(AudioData),
@ -323,8 +324,10 @@ static AVInputFormat audio_demuxer = {
audio_read_close, audio_read_close,
.flags = AVFMT_NOFILE, .flags = AVFMT_NOFILE,
}; };
#endif
static AVOutputFormat audio_muxer = { #ifdef CONFIG_AUDIO_MUXER
AVOutputFormat audio_muxer = {
"audio_device", "audio_device",
"audio grab and output", "audio grab and output",
"", "",
@ -344,10 +347,4 @@ static AVOutputFormat audio_muxer = {
audio_write_trailer, audio_write_trailer,
.flags = AVFMT_NOFILE, .flags = AVFMT_NOFILE,
}; };
#endif
int audio_init(void)
{
av_register_input_format(&audio_demuxer);
av_register_output_format(&audio_muxer);
return 0;
}

View File

@ -923,7 +923,7 @@ static int avi_probe(AVProbeData *p)
return 0; return 0;
} }
static AVInputFormat avi_demuxer = { AVInputFormat avi_demuxer = {
"avi", "avi",
"avi format", "avi format",
sizeof(AVIContext), sizeof(AVIContext),
@ -933,9 +933,3 @@ static AVInputFormat avi_demuxer = {
avi_read_close, avi_read_close,
avi_read_seek, avi_read_seek,
}; };
int avidec_init(void)
{
av_register_input_format(&avi_demuxer);
return 0;
}

View File

@ -24,7 +24,7 @@
* - fill all fields if non streamed (nb_frames for example) * - fill all fields if non streamed (nb_frames for example)
*/ */
#ifdef CONFIG_MUXERS #ifdef CONFIG_AVI_MUXER
typedef struct AVIIentry { typedef struct AVIIentry {
unsigned int flags, pos, len; unsigned int flags, pos, len;
} AVIIentry; } AVIIentry;
@ -71,7 +71,7 @@ void end_tag(ByteIOContext *pb, offset_t start)
put_le32(pb, (uint32_t)(pos - start)); put_le32(pb, (uint32_t)(pos - start));
url_fseek(pb, pos, SEEK_SET); url_fseek(pb, pos, SEEK_SET);
} }
#endif //CONFIG_MUXERS #endif //CONFIG_AVI_MUXER
/* Note: when encoding, the first matching tag is used, so order is /* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */ important if multiple tags possible for a given codec. */
@ -260,7 +260,7 @@ enum CodecID codec_get_wav_id(unsigned int tag)
return codec_get_id(codec_wav_tags, tag); return codec_get_id(codec_wav_tags, tag);
} }
#ifdef CONFIG_MUXERS #ifdef CONFIG_AVI_MUXER
/* BITMAPINFOHEADER header */ /* BITMAPINFOHEADER header */
void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf) void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
{ {
@ -762,7 +762,7 @@ static int avi_write_trailer(AVFormatContext *s)
return res; return res;
} }
static AVOutputFormat avi_muxer = { AVOutputFormat avi_muxer = {
"avi", "avi",
"avi format", "avi format",
"video/x-msvideo", "video/x-msvideo",
@ -774,10 +774,4 @@ static AVOutputFormat avi_muxer = {
avi_write_packet, avi_write_packet,
avi_write_trailer, avi_write_trailer,
}; };
#endif //CONFIG_AVI_MUXER
int avienc_init(void)
{
av_register_output_format(&avi_muxer);
return 0;
}
#endif //CONFIG_MUXERS

View File

@ -41,9 +41,6 @@ typedef enum avs_block_type {
AVS_GAME_DATA = 0x04, AVS_GAME_DATA = 0x04,
} avs_block_type_t; } avs_block_type_t;
#ifdef CONFIG_DEMUXERS
static int avs_probe(AVProbeData * p) static int avs_probe(AVProbeData * p)
{ {
const uint8_t *d; const uint8_t *d;
@ -217,7 +214,7 @@ static int avs_read_close(AVFormatContext * s)
return 0; return 0;
} }
static AVInputFormat avs_demuxer = { AVInputFormat avs_demuxer = {
"avs", "avs",
"avs format", "avs format",
sizeof(avs_format_t), sizeof(avs_format_t),
@ -226,13 +223,3 @@ static AVInputFormat avs_demuxer = {
avs_read_packet, avs_read_packet,
avs_read_close, avs_read_close,
}; };
#endif /* CONFIG_DEMUXERS */
int avs_init(void)
{
#ifdef CONFIG_DEMUXERS
av_register_input_format(&avs_demuxer);
#endif /* CONFIG_DEMUXERS */
return 0;
}

View File

@ -56,8 +56,8 @@ unsigned long update_adler32(unsigned long adler, const uint8_t *buf, unsigned i
} }
return (s2 << 16) | s1; return (s2 << 16) | s1;
} }
#ifdef CONFIG_MUXERS
#ifdef CONFIG_CRC_MUXER
typedef struct CRCState { typedef struct CRCState {
uint32_t crcval; uint32_t crcval;
} CRCState; } CRCState;
@ -89,7 +89,9 @@ static int crc_write_trailer(struct AVFormatContext *s)
put_flush_packet(&s->pb); put_flush_packet(&s->pb);
return 0; return 0;
} }
#endif
#ifdef CONFIG_FRAMECRC_MUXER
static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{ {
uint32_t crc = update_adler32(0, pkt->data, pkt->size); uint32_t crc = update_adler32(0, pkt->data, pkt->size);
@ -100,8 +102,10 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
put_flush_packet(&s->pb); put_flush_packet(&s->pb);
return 0; return 0;
} }
#endif
static AVOutputFormat crc_muxer = { #ifdef CONFIG_CRC_MUXER
AVOutputFormat crc_muxer = {
"crc", "crc",
"crc testing format", "crc testing format",
NULL, NULL,
@ -113,8 +117,9 @@ static AVOutputFormat crc_muxer = {
crc_write_packet, crc_write_packet,
crc_write_trailer, crc_write_trailer,
}; };
#endif
static AVOutputFormat framecrc_muxer = { #ifdef CONFIG_FRAMECRC_MUXER
AVOutputFormat framecrc_muxer = {
"framecrc", "framecrc",
"framecrc testing format", "framecrc testing format",
NULL, NULL,
@ -126,11 +131,4 @@ static AVOutputFormat framecrc_muxer = {
framecrc_write_packet, framecrc_write_packet,
NULL, NULL,
}; };
#endif
int crc_init(void)
{
av_register_output_format(&crc_muxer);
av_register_output_format(&framecrc_muxer);
return 0;
}
#endif /* CONFIG_MUXERS */

View File

@ -43,7 +43,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
return ret; return ret;
} }
static AVInputFormat daud_demuxer = { AVInputFormat daud_demuxer = {
"daud", "daud",
"D-Cinema audio format", "D-Cinema audio format",
0, 0,
@ -54,10 +54,3 @@ static AVInputFormat daud_demuxer = {
NULL, NULL,
.extensions = "302", .extensions = "302",
}; };
int daud_init(void)
{
av_register_input_format(&daud_demuxer);
return 0;
}

View File

@ -180,7 +180,7 @@ static int dc1394_close(AVFormatContext * context)
return 0; return 0;
} }
static AVInputFormat dc1394_demuxer = { AVInputFormat dc1394_demuxer = {
.name = "dc1394", .name = "dc1394",
.long_name = "dc1394 A/V grab", .long_name = "dc1394 A/V grab",
.priv_data_size = sizeof(struct dc1394_data), .priv_data_size = sizeof(struct dc1394_data),
@ -189,9 +189,3 @@ static AVInputFormat dc1394_demuxer = {
.read_close = dc1394_close, .read_close = dc1394_close,
.flags = AVFMT_NOFILE .flags = AVFMT_NOFILE
}; };
int dc1394_init(void)
{
av_register_input_format(&dc1394_demuxer);
return 0;
}

View File

@ -1000,7 +1000,8 @@ static int dv_write_trailer(struct AVFormatContext *s)
} }
#endif /* CONFIG_MUXERS */ #endif /* CONFIG_MUXERS */
static AVInputFormat dv_demuxer = { #ifdef CONFIG_DV_DEMUXER
AVInputFormat dv_demuxer = {
"dv", "dv",
"DV video format", "DV video format",
sizeof(RawDVContext), sizeof(RawDVContext),
@ -1011,9 +1012,9 @@ static AVInputFormat dv_demuxer = {
dv_read_seek, dv_read_seek,
.extensions = "dv,dif", .extensions = "dv,dif",
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_DV_MUXER
static AVOutputFormat dv_muxer = { AVOutputFormat dv_muxer = {
"dv", "dv",
"DV video format", "DV video format",
NULL, NULL,
@ -1026,12 +1027,3 @@ static AVOutputFormat dv_muxer = {
dv_write_trailer, dv_write_trailer,
}; };
#endif #endif
int ff_dv_init(void)
{
av_register_input_format(&dv_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&dv_muxer);
#endif
return 0;
}

View File

@ -227,7 +227,7 @@ static int dv1394_close(AVFormatContext * context)
return 0; return 0;
} }
static AVInputFormat dv1394_demuxer = { AVInputFormat dv1394_demuxer = {
.name = "dv1394", .name = "dv1394",
.long_name = "dv1394 A/V grab", .long_name = "dv1394 A/V grab",
.priv_data_size = sizeof(struct dv1394_data), .priv_data_size = sizeof(struct dv1394_data),
@ -236,9 +236,3 @@ static AVInputFormat dv1394_demuxer = {
.read_close = dv1394_close, .read_close = dv1394_close,
.flags = AVFMT_NOFILE .flags = AVFMT_NOFILE
}; };
int dv1394_init(void)
{
av_register_input_format(&dv1394_demuxer);
return 0;
}

View File

@ -278,7 +278,7 @@ static int ea_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat ea_demuxer = { AVInputFormat ea_demuxer = {
"ea", "ea",
"Electronic Arts Multimedia Format", "Electronic Arts Multimedia Format",
sizeof(EaDemuxContext), sizeof(EaDemuxContext),
@ -287,9 +287,3 @@ static AVInputFormat ea_demuxer = {
ea_read_packet, ea_read_packet,
ea_read_close, ea_read_close,
}; };
int ea_init(void)
{
av_register_input_format(&ea_demuxer);
return 0;
}

View File

@ -761,7 +761,8 @@ static int ffm_probe(AVProbeData *p)
return 0; return 0;
} }
static AVInputFormat ffm_demuxer = { #ifdef CONFIG_FFM_DEMUXER
AVInputFormat ffm_demuxer = {
"ffm", "ffm",
"ffm format", "ffm format",
sizeof(FFMContext), sizeof(FFMContext),
@ -771,9 +772,9 @@ static AVInputFormat ffm_demuxer = {
ffm_read_close, ffm_read_close,
ffm_seek, ffm_seek,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_FFM_MUXER
static AVOutputFormat ffm_muxer = { AVOutputFormat ffm_muxer = {
"ffm", "ffm",
"ffm format", "ffm format",
"", "",
@ -786,13 +787,4 @@ static AVOutputFormat ffm_muxer = {
ffm_write_packet, ffm_write_packet,
ffm_write_trailer, ffm_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_FFM_MUXER
int ffm_init(void)
{
av_register_input_format(&ffm_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&ffm_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -208,7 +208,7 @@ static int flic_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat flic_demuxer = { AVInputFormat flic_demuxer = {
"flic", "flic",
"FLI/FLC/FLX animation format", "FLI/FLC/FLX animation format",
sizeof(FlicDemuxContext), sizeof(FlicDemuxContext),
@ -217,9 +217,3 @@ static AVInputFormat flic_demuxer = {
flic_read_packet, flic_read_packet,
flic_read_close, flic_read_close,
}; };
int flic_init(void)
{
av_register_input_format(&flic_demuxer);
return 0;
}

View File

@ -222,9 +222,3 @@ AVInputFormat flv_demuxer = {
.extensions = "flv", .extensions = "flv",
.value = CODEC_ID_FLV1, .value = CODEC_ID_FLV1,
}; };
int flvdec_init(void)
{
av_register_input_format(&flv_demuxer);
return 0;
}

View File

@ -167,7 +167,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0; return 0;
} }
static AVOutputFormat flv_muxer = { AVOutputFormat flv_muxer = {
"flv", "flv",
"flv format", "flv format",
"video/x-flv", "video/x-flv",
@ -183,9 +183,3 @@ static AVOutputFormat flv_muxer = {
flv_write_packet, flv_write_packet,
flv_write_trailer, flv_write_trailer,
}; };
int flvenc_init(void)
{
av_register_output_format(&flv_muxer);
return 0;
}

View File

@ -414,7 +414,7 @@ int gif_write(ByteIOContext *pb, AVImageInfo *info)
return 0; return 0;
} }
static AVOutputFormat gif_muxer = { AVOutputFormat gif_muxer = {
"gif", "gif",
"GIF Animation", "GIF Animation",
"image/gif", "image/gif",
@ -426,12 +426,3 @@ static AVOutputFormat gif_muxer = {
gif_write_packet, gif_write_packet,
gif_write_trailer, gif_write_trailer,
}; };
extern AVInputFormat gif_demuxer;
int gif_init(void)
{
av_register_output_format(&gif_muxer);
av_register_input_format(&gif_demuxer);
return 0;
}

View File

@ -636,5 +636,7 @@ AVImageFormat gif_image_format = {
gif_image_probe, gif_image_probe,
gif_read, gif_read,
(1 << PIX_FMT_PAL8), (1 << PIX_FMT_PAL8),
#ifdef CONFIG_GIF_MUXER
gif_write, gif_write,
#endif
}; };

View File

@ -365,7 +365,7 @@ static int grab_read_close(AVFormatContext *s1)
return 0; return 0;
} }
static AVInputFormat video_grab_device_demuxer = { AVInputFormat video_grab_device_demuxer = {
"video4linux", "video4linux",
"video grab", "video grab",
sizeof(VideoData), sizeof(VideoData),
@ -848,9 +848,3 @@ static int aiw_close(VideoData *s)
av_freep(&s->src_mem); av_freep(&s->src_mem);
return 0; return 0;
} }
int video_grab_init(void)
{
av_register_input_format(&video_grab_device_demuxer);
return 0;
}

View File

@ -326,9 +326,3 @@ AVInputFormat video_grab_device_demuxer = {
grab_read_close, grab_read_close,
.flags = AVFMT_NOFILE, .flags = AVFMT_NOFILE,
}; };
int video_grab_init(void)
{
av_register_input_format(&video_grab_device_demuxer);
return 0;
}

View File

@ -241,7 +241,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
return AVERROR_IO; return AVERROR_IO;
} }
static AVInputFormat gxf_demuxer = { AVInputFormat gxf_demuxer = {
"gxf", "gxf",
"GXF format", "GXF format",
0, 0,
@ -251,9 +251,3 @@ static AVInputFormat gxf_demuxer = {
NULL, NULL,
NULL, NULL,
}; };
int gxf_init(void) {
av_register_input_format(&gxf_demuxer);
return 0;
}

View File

@ -288,7 +288,7 @@ static int idcin_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat idcin_demuxer = { AVInputFormat idcin_demuxer = {
"idcin", "idcin",
"Id CIN format", "Id CIN format",
sizeof(IdcinDemuxContext), sizeof(IdcinDemuxContext),
@ -297,9 +297,3 @@ static AVInputFormat idcin_demuxer = {
idcin_read_packet, idcin_read_packet,
idcin_read_close, idcin_read_close,
}; };
int idcin_init(void)
{
av_register_input_format(&idcin_demuxer);
return 0;
}

View File

@ -278,7 +278,7 @@ static int roq_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat roq_demuxer = { AVInputFormat roq_demuxer = {
"RoQ", "RoQ",
"Id RoQ format", "Id RoQ format",
sizeof(RoqDemuxContext), sizeof(RoqDemuxContext),
@ -287,9 +287,3 @@ static AVInputFormat roq_demuxer = {
roq_read_packet, roq_read_packet,
roq_read_close, roq_read_close,
}; };
int roq_init(void)
{
av_register_input_format(&roq_demuxer);
return 0;
}

View File

@ -339,8 +339,8 @@ static int img_write_trailer(AVFormatContext *s)
} }
/* input */ /* input */
#ifdef CONFIG_IMAGE_DEMUXER
static AVInputFormat image_demuxer = { AVInputFormat image_demuxer = {
"image", "image",
"image sequence", "image sequence",
sizeof(VideoData), sizeof(VideoData),
@ -352,8 +352,9 @@ static AVInputFormat image_demuxer = {
NULL, NULL,
AVFMT_NOFILE | AVFMT_NEEDNUMBER, AVFMT_NOFILE | AVFMT_NEEDNUMBER,
}; };
#endif
static AVInputFormat imagepipe_demuxer = { #ifdef CONFIG_IMAGEPIPE_DEMUXER
AVInputFormat imagepipe_demuxer = {
"imagepipe", "imagepipe",
"piped image sequence", "piped image sequence",
sizeof(VideoData), sizeof(VideoData),
@ -363,11 +364,11 @@ static AVInputFormat imagepipe_demuxer = {
img_read_close, img_read_close,
NULL, NULL,
}; };
#endif
/* output */ /* output */
#ifdef CONFIG_IMAGE_MUXER
static AVOutputFormat image_muxer = { AVOutputFormat image_muxer = {
"image", "image",
"image sequence", "image sequence",
"", "",
@ -381,8 +382,9 @@ static AVOutputFormat image_muxer = {
AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE, AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
img_set_parameters, img_set_parameters,
}; };
#endif
static AVOutputFormat imagepipe_muxer = { #ifdef CONFIG_IMAGEPIPE_MUXER
AVOutputFormat imagepipe_muxer = {
"imagepipe", "imagepipe",
"piped image sequence", "piped image sequence",
"", "",
@ -396,14 +398,4 @@ static AVOutputFormat imagepipe_muxer = {
AVFMT_RAWPICTURE, AVFMT_RAWPICTURE,
img_set_parameters, img_set_parameters,
}; };
#endif
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;
}

View File

@ -364,8 +364,8 @@ static int img_write_trailer(AVFormatContext *s)
#endif /* CONFIG_MUXERS */ #endif /* CONFIG_MUXERS */
/* input */ /* input */
#ifdef CONFIG_IMAGE2_DEMUXER
static AVInputFormat image2_demuxer = { AVInputFormat image2_demuxer = {
"image2", "image2",
"image2 sequence", "image2 sequence",
sizeof(VideoData), sizeof(VideoData),
@ -377,8 +377,9 @@ static AVInputFormat image2_demuxer = {
NULL, NULL,
AVFMT_NOFILE, AVFMT_NOFILE,
}; };
#endif
static AVInputFormat image2pipe_demuxer = { #ifdef CONFIG_IMAGE2PIPE_DEMUXER
AVInputFormat image2pipe_demuxer = {
"image2pipe", "image2pipe",
"piped image2 sequence", "piped image2 sequence",
sizeof(VideoData), sizeof(VideoData),
@ -388,12 +389,11 @@ static AVInputFormat image2pipe_demuxer = {
img_read_close, img_read_close,
NULL, NULL,
}; };
#endif
#ifdef CONFIG_MUXERS
/* output */ /* output */
#ifdef CONFIG_IMAGE2_MUXER
static AVOutputFormat image2_muxer = { AVOutputFormat image2_muxer = {
"image2", "image2",
"image2 sequence", "image2 sequence",
"", "",
@ -406,8 +406,9 @@ static AVOutputFormat image2_muxer = {
img_write_trailer, img_write_trailer,
AVFMT_NOFILE, AVFMT_NOFILE,
}; };
#endif
static AVOutputFormat image2pipe_muxer = { #ifdef CONFIG_IMAGE2PIPE_MUXER
AVOutputFormat image2pipe_muxer = {
"image2pipe", "image2pipe",
"piped image2 sequence", "piped image2 sequence",
"", "",
@ -419,17 +420,4 @@ static AVOutputFormat image2pipe_muxer = {
img_write_packet, img_write_packet,
img_write_trailer, img_write_trailer,
}; };
#endif /* CONFIG_MUXERS */
int img2_init(void)
{
av_register_input_format(&image2_demuxer);
av_register_input_format(&image2pipe_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&image2_muxer);
av_register_output_format(&image2pipe_muxer);
#endif #endif
return 0;
}

View File

@ -612,7 +612,7 @@ static int ipmovie_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat ipmovie_demuxer = { AVInputFormat ipmovie_demuxer = {
"ipmovie", "ipmovie",
"Interplay MVE format", "Interplay MVE format",
sizeof(IPMVEContext), sizeof(IPMVEContext),
@ -621,10 +621,3 @@ static AVInputFormat ipmovie_demuxer = {
ipmovie_read_packet, ipmovie_read_packet,
ipmovie_read_close, ipmovie_read_close,
}; };
int ipmovie_init(void)
{
av_register_input_format(&ipmovie_demuxer);
return 0;
}

View File

@ -160,7 +160,7 @@ static int jpeg_read(ByteIOContext *f,
return jctx.ret_code; return jctx.ret_code;
} }
#ifdef CONFIG_MUXERS #if defined(CONFIG_MUXERS) && defined(CONFIG_MJPEG_ENCODER)
static int jpeg_write(ByteIOContext *pb, AVImageInfo *info) static int jpeg_write(ByteIOContext *pb, AVImageInfo *info)
{ {
AVCodecContext *c; AVCodecContext *c;
@ -230,7 +230,7 @@ AVImageFormat jpeg_image_format = {
jpeg_probe, jpeg_probe,
jpeg_read, jpeg_read,
(1 << PIX_FMT_YUVJ420P) | (1 << PIX_FMT_YUVJ422P) | (1 << PIX_FMT_YUVJ444P), (1 << PIX_FMT_YUVJ420P) | (1 << PIX_FMT_YUVJ422P) | (1 << PIX_FMT_YUVJ444P),
#ifdef CONFIG_MUXERS #if defined(CONFIG_MUXERS) && defined(CONFIG_MJPEG_ENCODER)
jpeg_write, jpeg_write,
#else #else
NULL, NULL,

View File

@ -2635,7 +2635,7 @@ matroska_read_close (AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat matroska_demuxer = { AVInputFormat matroska_demuxer = {
"matroska", "matroska",
"Matroska file format", "Matroska file format",
sizeof(MatroskaDemuxContext), sizeof(MatroskaDemuxContext),
@ -2644,10 +2644,3 @@ static AVInputFormat matroska_demuxer = {
matroska_read_packet, matroska_read_packet,
matroska_read_close, matroska_read_close,
}; };
int
matroska_init(void)
{
av_register_input_format(&matroska_demuxer);
return 0;
}

View File

@ -199,7 +199,7 @@ static int mm_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat mm_demuxer = { AVInputFormat mm_demuxer = {
"mm", "mm",
"American Laser Games MM format", "American Laser Games MM format",
sizeof(MmDemuxContext), sizeof(MmDemuxContext),
@ -208,9 +208,3 @@ static AVInputFormat mm_demuxer = {
mm_read_packet, mm_read_packet,
mm_read_close, mm_read_close,
}; };
int mm_init(void)
{
av_register_input_format(&mm_demuxer);
return 0;
}

View File

@ -301,8 +301,8 @@ static int mmf_read_seek(AVFormatContext *s,
return pcm_read_seek(s, stream_index, timestamp, flags); return pcm_read_seek(s, stream_index, timestamp, flags);
} }
#ifdef CONFIG_MMF_DEMUXER
static AVInputFormat mmf_demuxer = { AVInputFormat mmf_demuxer = {
"mmf", "mmf",
"mmf format", "mmf format",
sizeof(MMFContext), sizeof(MMFContext),
@ -312,9 +312,9 @@ static AVInputFormat mmf_demuxer = {
mmf_read_close, mmf_read_close,
mmf_read_seek, mmf_read_seek,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_MMF_MUXER
static AVOutputFormat mmf_muxer = { AVOutputFormat mmf_muxer = {
"mmf", "mmf",
"mmf format", "mmf format",
"application/vnd.smaf", "application/vnd.smaf",
@ -326,14 +326,4 @@ static AVOutputFormat mmf_muxer = {
mmf_write_packet, mmf_write_packet,
mmf_write_trailer, mmf_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif
int ff_mmf_init(void)
{
av_register_input_format(&mmf_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&mmf_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -1907,7 +1907,7 @@ static int mov_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat mov_demuxer = { AVInputFormat mov_demuxer = {
"mov,mp4,m4a,3gp,3g2,mj2", "mov,mp4,m4a,3gp,3g2,mj2",
"QuickTime/MPEG4/Motion JPEG 2000 format", "QuickTime/MPEG4/Motion JPEG 2000 format",
sizeof(MOVContext), sizeof(MOVContext),
@ -1917,9 +1917,3 @@ static AVInputFormat mov_demuxer = {
mov_read_close, mov_read_close,
mov_read_seek, mov_read_seek,
}; };
int mov_init(void)
{
av_register_input_format(&mov_demuxer);
return 0;
}

View File

@ -1588,7 +1588,8 @@ static int mov_write_trailer(AVFormatContext *s)
return res; return res;
} }
static AVOutputFormat mov_muxer = { #ifdef CONFIG_MOV_MUXER
AVOutputFormat mov_muxer = {
"mov", "mov",
"mov format", "mov format",
NULL, NULL,
@ -1601,8 +1602,9 @@ static AVOutputFormat mov_muxer = {
mov_write_trailer, mov_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
static AVOutputFormat _3gp_muxer = { #ifdef CONFIG_TGP_MUXER
AVOutputFormat tgp_muxer = {
"3gp", "3gp",
"3gp format", "3gp format",
NULL, NULL,
@ -1615,8 +1617,9 @@ static AVOutputFormat _3gp_muxer = {
mov_write_trailer, mov_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
static AVOutputFormat mp4_muxer = { #ifdef CONFIG_MP4_MUXER
AVOutputFormat mp4_muxer = {
"mp4", "mp4",
"mp4 format", "mp4 format",
"application/mp4", "application/mp4",
@ -1629,8 +1632,9 @@ static AVOutputFormat mp4_muxer = {
mov_write_trailer, mov_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
static AVOutputFormat psp_muxer = { #ifdef CONFIG_PSP_MUXER
AVOutputFormat psp_muxer = {
"psp", "psp",
"psp mp4 format", "psp mp4 format",
NULL, NULL,
@ -1643,8 +1647,9 @@ static AVOutputFormat psp_muxer = {
mov_write_trailer, mov_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
static AVOutputFormat _3g2_muxer = { #ifdef CONFIG_TG2_MUXER
AVOutputFormat tg2_muxer = {
"3g2", "3g2",
"3gp2 format", "3gp2 format",
NULL, NULL,
@ -1657,13 +1662,4 @@ static AVOutputFormat _3g2_muxer = {
mov_write_trailer, mov_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif
int movenc_init(void)
{
av_register_output_format(&mov_muxer);
av_register_output_format(&_3gp_muxer);
av_register_output_format(&mp4_muxer);
av_register_output_format(&psp_muxer);
av_register_output_format(&_3g2_muxer);
return 0;
}

View File

@ -368,6 +368,7 @@ static int mp3_write_trailer(struct AVFormatContext *s)
} }
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
#ifdef CONFIG_MP3_DEMUXER
AVInputFormat mp3_demuxer = { AVInputFormat mp3_demuxer = {
"mp3", "mp3",
"MPEG audio", "MPEG audio",
@ -378,8 +379,8 @@ AVInputFormat mp3_demuxer = {
mp3_read_close, mp3_read_close,
.extensions = "mp2,mp3,m2a", /* XXX: use probe */ .extensions = "mp2,mp3,m2a", /* XXX: use probe */
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_MP2_MUXER
AVOutputFormat mp2_muxer = { AVOutputFormat mp2_muxer = {
"mp2", "mp2",
"MPEG audio layer 2", "MPEG audio layer 2",
@ -396,8 +397,8 @@ AVOutputFormat mp2_muxer = {
mp3_write_packet, mp3_write_packet,
mp3_write_trailer, mp3_write_trailer,
}; };
#endif
#ifdef CONFIG_MP3LAME #ifdef CONFIG_MP3_MUXER
AVOutputFormat mp3_muxer = { AVOutputFormat mp3_muxer = {
"mp3", "mp3",
"MPEG audio layer 3", "MPEG audio layer 3",
@ -411,16 +412,3 @@ AVOutputFormat mp3_muxer = {
mp3_write_trailer, mp3_write_trailer,
}; };
#endif #endif
#endif //CONFIG_MUXERS
int mp3_init(void)
{
av_register_input_format(&mp3_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&mp2_muxer);
#ifdef CONFIG_MP3LAME
av_register_output_format(&mp3_muxer);
#endif
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -108,11 +108,11 @@ typedef struct {
static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
#ifdef CONFIG_MUXERS #ifdef CONFIG_MUXERS
static AVOutputFormat mpeg1system_muxer; AVOutputFormat mpeg1system_muxer;
static AVOutputFormat mpeg1vcd_muxer; AVOutputFormat mpeg1vcd_muxer;
static AVOutputFormat mpeg2vob_muxer; AVOutputFormat mpeg2vob_muxer;
static AVOutputFormat mpeg2svcd_muxer; AVOutputFormat mpeg2svcd_muxer;
static AVOutputFormat mpeg2dvd_muxer; AVOutputFormat mpeg2dvd_muxer;
static int put_pack_header(AVFormatContext *ctx, static int put_pack_header(AVFormatContext *ctx,
uint8_t *buf, int64_t timestamp) uint8_t *buf, int64_t timestamp)
@ -1712,8 +1712,8 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
return dts; return dts;
} }
#ifdef CONFIG_MUXERS #ifdef CONFIG_MPEG1SYSTEM_MUXER
static AVOutputFormat mpeg1system_muxer = { AVOutputFormat mpeg1system_muxer = {
"mpeg", "mpeg",
"MPEG1 System format", "MPEG1 System format",
"video/mpeg", "video/mpeg",
@ -1725,8 +1725,9 @@ static AVOutputFormat mpeg1system_muxer = {
mpeg_mux_write_packet, mpeg_mux_write_packet,
mpeg_mux_end, mpeg_mux_end,
}; };
#endif
static AVOutputFormat mpeg1vcd_muxer = { #ifdef CONFIG_MPEG1VCD_MUXER
AVOutputFormat mpeg1vcd_muxer = {
"vcd", "vcd",
"MPEG1 System format (VCD)", "MPEG1 System format (VCD)",
"video/mpeg", "video/mpeg",
@ -1738,8 +1739,9 @@ static AVOutputFormat mpeg1vcd_muxer = {
mpeg_mux_write_packet, mpeg_mux_write_packet,
mpeg_mux_end, mpeg_mux_end,
}; };
#endif
static AVOutputFormat mpeg2vob_muxer = { #ifdef CONFIG_MPEG2VOB_MUXER
AVOutputFormat mpeg2vob_muxer = {
"vob", "vob",
"MPEG2 PS format (VOB)", "MPEG2 PS format (VOB)",
"video/mpeg", "video/mpeg",
@ -1751,9 +1753,11 @@ static AVOutputFormat mpeg2vob_muxer = {
mpeg_mux_write_packet, mpeg_mux_write_packet,
mpeg_mux_end, mpeg_mux_end,
}; };
#endif
/* Same as mpeg2vob_muxer except that the pack size is 2324 */ /* Same as mpeg2vob_mux except that the pack size is 2324 */
static AVOutputFormat mpeg2svcd_muxer = { #ifdef CONFIG_MPEG2SVCD_MUXER
AVOutputFormat mpeg2svcd_muxer = {
"svcd", "svcd",
"MPEG2 PS format (VOB)", "MPEG2 PS format (VOB)",
"video/mpeg", "video/mpeg",
@ -1765,9 +1769,11 @@ static AVOutputFormat mpeg2svcd_muxer = {
mpeg_mux_write_packet, mpeg_mux_write_packet,
mpeg_mux_end, mpeg_mux_end,
}; };
#endif
/* Same as mpeg2vob_muxer except the 'is_dvd' flag is set to produce NAV pkts */ /* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */
static AVOutputFormat mpeg2dvd_muxer = { #ifdef CONFIG_MPEG2DVD_MUXER
AVOutputFormat mpeg2dvd_muxer = {
"dvd", "dvd",
"MPEG2 PS format (DVD VOB)", "MPEG2 PS format (DVD VOB)",
"video/mpeg", "video/mpeg",
@ -1779,9 +1785,9 @@ static AVOutputFormat mpeg2dvd_muxer = {
mpeg_mux_write_packet, mpeg_mux_write_packet,
mpeg_mux_end, mpeg_mux_end,
}; };
#endif
#endif //CONFIG_MUXERS #ifdef CONFIG_MPEGPS_DEMUXER
AVInputFormat mpegps_demuxer = { AVInputFormat mpegps_demuxer = {
"mpeg", "mpeg",
"MPEG PS format", "MPEG PS format",
@ -1794,16 +1800,4 @@ AVInputFormat mpegps_demuxer = {
mpegps_read_dts, mpegps_read_dts,
.flags = AVFMT_SHOW_IDS, .flags = AVFMT_SHOW_IDS,
}; };
#endif
int mpegps_init(void)
{
#ifdef CONFIG_MUXERS
av_register_output_format(&mpeg1system_muxer);
av_register_output_format(&mpeg1vcd_muxer);
av_register_output_format(&mpeg2vob_muxer);
av_register_output_format(&mpeg2svcd_muxer);
av_register_output_format(&mpeg2dvd_muxer);
#endif //CONFIG_MUXERS
av_register_input_format(&mpegps_demuxer);
return 0;
}

View File

@ -1523,12 +1523,3 @@ AVInputFormat mpegts_demuxer = {
mpegts_get_pcr, mpegts_get_pcr,
.flags = AVFMT_SHOW_IDS, .flags = AVFMT_SHOW_IDS,
}; };
int mpegts_init(void)
{
av_register_input_format(&mpegts_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&mpegts_muxer);
#endif
return 0;
}

View File

@ -22,7 +22,6 @@
/* write DVB SI sections */ /* write DVB SI sections */
#ifdef CONFIG_MUXERS
/*********************************************/ /*********************************************/
/* mpegts section writer */ /* mpegts section writer */
@ -673,4 +672,3 @@ AVOutputFormat mpegts_muxer = {
mpegts_write_packet, mpegts_write_packet,
mpegts_write_end, mpegts_write_end,
}; };
#endif // CONFIG_MUXERS

View File

@ -22,7 +22,6 @@
#define BOUNDARY_TAG "ffserver" #define BOUNDARY_TAG "ffserver"
#ifdef CONFIG_MUXERS
static int mpjpeg_write_header(AVFormatContext *s) static int mpjpeg_write_header(AVFormatContext *s)
{ {
uint8_t buf1[256]; uint8_t buf1[256];
@ -52,7 +51,7 @@ static int mpjpeg_write_trailer(AVFormatContext *s)
return 0; return 0;
} }
static AVOutputFormat mpjpeg_muxer = { AVOutputFormat mpjpeg_muxer = {
"mpjpeg", "mpjpeg",
"Mime multipart JPEG format", "Mime multipart JPEG format",
"multipart/x-mixed-replace;boundary=" BOUNDARY_TAG, "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,
@ -64,10 +63,3 @@ static AVOutputFormat mpjpeg_muxer = {
mpjpeg_write_packet, mpjpeg_write_packet,
mpjpeg_write_trailer, mpjpeg_write_trailer,
}; };
int jpeg_init(void)
{
av_register_output_format(&mpjpeg_muxer);
return 0;
}
#endif //CONFIG_MUXERS

View File

@ -742,7 +742,7 @@ static int nsv_probe(AVProbeData *p)
return 0; return 0;
} }
static AVInputFormat nsv_demuxer = { AVInputFormat nsv_demuxer = {
"nsv", "nsv",
"NullSoft Video format", "NullSoft Video format",
sizeof(NSVContext), sizeof(NSVContext),
@ -752,9 +752,3 @@ static AVInputFormat nsv_demuxer = {
nsv_read_close, nsv_read_close,
nsv_read_seek, nsv_read_seek,
}; };
int nsvdec_init(void)
{
av_register_input_format(&nsv_demuxer);
return 0;
}

View File

@ -1419,7 +1419,8 @@ static int nut_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat nut_demuxer = { #ifdef CONFIG_NUT_DEMUXER
AVInputFormat nut_demuxer = {
"nut", "nut",
"nut format", "nut format",
sizeof(NUTContext), sizeof(NUTContext),
@ -1431,9 +1432,9 @@ static AVInputFormat nut_demuxer = {
nut_read_timestamp, nut_read_timestamp,
.extensions = "nut", .extensions = "nut",
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_NUT_MUXER
static AVOutputFormat nut_muxer = { AVOutputFormat nut_muxer = {
"nut", "nut",
"nut format", "nut format",
"video/x-nut", "video/x-nut",
@ -1452,13 +1453,4 @@ static AVOutputFormat nut_muxer = {
nut_write_trailer, nut_write_trailer,
.flags = AVFMT_GLOBALHEADER, .flags = AVFMT_GLOBALHEADER,
}; };
#endif //CONFIG_MUXERS #endif
int nut_init(void)
{
av_register_input_format(&nut_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&nut_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -227,7 +227,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
return AVERROR_IO; return AVERROR_IO;
} }
static AVInputFormat nuv_demuxer = { AVInputFormat nuv_demuxer = {
"nuv", "nuv",
"NuppelVideo format", "NuppelVideo format",
sizeof(NUVContext), sizeof(NUVContext),
@ -237,9 +237,3 @@ static AVInputFormat nuv_demuxer = {
NULL, NULL,
NULL, NULL,
}; };
int nuv_init(void) {
av_register_input_format(&nuv_demuxer);
return 0;
}

View File

@ -137,7 +137,7 @@ static int ogg_write_trailer(AVFormatContext *avfcontext) {
} }
static AVOutputFormat ogg_muxer = { AVOutputFormat ogg_muxer = {
"ogg", "ogg",
"Ogg Vorbis", "Ogg Vorbis",
"audio/x-vorbis", "audio/x-vorbis",
@ -254,7 +254,7 @@ static int ogg_read_close(AVFormatContext *avfcontext) {
} }
static AVInputFormat ogg_demuxer = { static AVInputFormat ogg_iformat = {
"ogg", "ogg",
"Ogg Vorbis", "Ogg Vorbis",
sizeof(OggContext), sizeof(OggContext),
@ -265,11 +265,3 @@ static AVInputFormat ogg_demuxer = {
.extensions = "ogg", .extensions = "ogg",
} ; } ;
#endif #endif
int libogg_init(void) {
#ifdef CONFIG_MUXERS
av_register_output_format(&ogg_muxer) ;
#endif
/* av_register_input_format(&ogg_demuxer); */
return 0 ;
}

View File

@ -65,7 +65,7 @@ ogg_write_trailer (AVFormatContext * avfcontext)
} }
static AVOutputFormat ogg_muxer = { AVOutputFormat ogg_muxer = {
"ogg", "ogg",
"Ogg Vorbis", "Ogg Vorbis",
"audio/x-vorbis", "audio/x-vorbis",
@ -656,7 +656,7 @@ static int ogg_probe(AVProbeData *p)
return 0; return 0;
} }
static AVInputFormat ogg_demuxer = { AVInputFormat ogg_demuxer = {
"ogg", "ogg",
"Ogg", "Ogg",
sizeof (ogg_t), sizeof (ogg_t),
@ -668,13 +668,3 @@ static AVInputFormat ogg_demuxer = {
// ogg_read_timestamp, // ogg_read_timestamp,
.extensions = "ogg", .extensions = "ogg",
}; };
int
ogg_init (void)
{
#if 0 // CONFIG_MUXERS
av_register_output_format (&ogg_muxer);
#endif
av_register_input_format (&ogg_demuxer);
return 0;
}

View File

@ -351,7 +351,7 @@ static int str_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat str_demuxer = { AVInputFormat str_demuxer = {
"psxstr", "psxstr",
"Sony Playstation STR format", "Sony Playstation STR format",
sizeof(StrDemuxContext), sizeof(StrDemuxContext),
@ -360,9 +360,3 @@ static AVInputFormat str_demuxer = {
str_read_packet, str_read_packet,
str_read_close, str_read_close,
}; };
int str_init(void)
{
av_register_input_format(&str_demuxer);
return 0;
}

View File

@ -813,70 +813,3 @@ AVOutputFormat null_muxer = {
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE, .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE,
}; };
#endif //CONFIG_MUXERS #endif //CONFIG_MUXERS
#ifndef CONFIG_MUXERS
#define av_register_output_format(format)
#endif
#ifndef CONFIG_DEMUXERS
#define av_register_input_format(format)
#endif
int raw_init(void)
{
av_register_input_format(&shorten_demuxer);
av_register_input_format(&flac_demuxer);
av_register_output_format(&flac_muxer);
av_register_input_format(&ac3_demuxer);
av_register_output_format(&ac3_muxer);
av_register_input_format(&aac_demuxer);
av_register_input_format(&dts_demuxer);
av_register_input_format(&h261_demuxer);
av_register_output_format(&h261_muxer);
av_register_input_format(&h263_demuxer);
av_register_output_format(&h263_muxer);
av_register_input_format(&m4v_demuxer);
av_register_output_format(&m4v_muxer);
av_register_input_format(&h264_demuxer);
av_register_output_format(&h264_muxer);
av_register_input_format(&mpegvideo_demuxer);
av_register_output_format(&mpeg1video_muxer);
av_register_output_format(&mpeg2video_muxer);
av_register_input_format(&mjpeg_demuxer);
av_register_output_format(&mjpeg_muxer);
av_register_input_format(&ingenient_demuxer);
av_register_input_format(&pcm_s16le_demuxer);
av_register_output_format(&pcm_s16le_muxer);
av_register_input_format(&pcm_s16be_demuxer);
av_register_output_format(&pcm_s16be_muxer);
av_register_input_format(&pcm_u16le_demuxer);
av_register_output_format(&pcm_u16le_muxer);
av_register_input_format(&pcm_u16be_demuxer);
av_register_output_format(&pcm_u16be_muxer);
av_register_input_format(&pcm_s8_demuxer);
av_register_output_format(&pcm_s8_muxer);
av_register_input_format(&pcm_u8_demuxer);
av_register_output_format(&pcm_u8_muxer);
av_register_input_format(&pcm_mulaw_demuxer);
av_register_output_format(&pcm_mulaw_muxer);
av_register_input_format(&pcm_alaw_demuxer);
av_register_output_format(&pcm_alaw_muxer);
av_register_input_format(&rawvideo_demuxer);
av_register_output_format(&rawvideo_muxer);
av_register_output_format(&null_muxer);
return 0;
}

View File

@ -1122,7 +1122,8 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
return dts; return dts;
} }
static AVInputFormat rm_demuxer = { #ifdef CONFIG_RM_DEMUXER
AVInputFormat rm_demuxer = {
"rm", "rm",
"rm format", "rm format",
sizeof(RMContext), sizeof(RMContext),
@ -1133,9 +1134,9 @@ static AVInputFormat rm_demuxer = {
NULL, NULL,
rm_read_dts, rm_read_dts,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_RM_MUXER
static AVOutputFormat rm_muxer = { AVOutputFormat rm_muxer = {
"rm", "rm",
"rm format", "rm format",
"application/vnd.rn-realmedia", "application/vnd.rn-realmedia",
@ -1147,13 +1148,4 @@ static AVOutputFormat rm_muxer = {
rm_write_packet, rm_write_packet,
rm_write_trailer, rm_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif
int rm_init(void)
{
av_register_input_format(&rm_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&rm_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -872,9 +872,3 @@ AVOutputFormat rtp_muxer = {
rtp_write_packet, rtp_write_packet,
rtp_write_trailer, rtp_write_trailer,
}; };
int rtp_init(void)
{
av_register_output_format(&rtp_muxer);
return 0;
}

View File

@ -1345,8 +1345,8 @@ static int sdp_read_close(AVFormatContext *s)
return 0; return 0;
} }
#ifdef CONFIG_SDP_DEMUXER
static AVInputFormat sdp_demuxer = { AVInputFormat sdp_demuxer = {
"sdp", "sdp",
"SDP", "SDP",
sizeof(RTSPState), sizeof(RTSPState),
@ -1355,7 +1355,7 @@ static AVInputFormat sdp_demuxer = {
sdp_read_packet, sdp_read_packet,
sdp_read_close, sdp_read_close,
}; };
#endif
/* dummy redirector format (used directly in av_open_input_file now) */ /* dummy redirector format (used directly in av_open_input_file now) */
static int redir_probe(AVProbeData *pd) static int redir_probe(AVProbeData *pd)
@ -1419,11 +1419,3 @@ AVInputFormat redir_demuxer = {
NULL, NULL,
NULL, NULL,
}; };
int rtsp_init(void)
{
av_register_input_format(&rtsp_demuxer);
av_register_input_format(&redir_demuxer);
av_register_input_format(&sdp_demuxer);
return 0;
}

View File

@ -297,7 +297,7 @@ static int film_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat film_demuxer = { AVInputFormat segafilm_demuxer = {
"film_cpk", "film_cpk",
"Sega FILM/CPK format", "Sega FILM/CPK format",
sizeof(FilmDemuxContext), sizeof(FilmDemuxContext),
@ -306,9 +306,3 @@ static AVInputFormat film_demuxer = {
film_read_packet, film_read_packet,
film_read_close, film_read_close,
}; };
int film_init(void)
{
av_register_input_format(&film_demuxer);
return 0;
}

View File

@ -319,7 +319,7 @@ static int vmd_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat vmd_demuxer = { AVInputFormat vmd_demuxer = {
"vmd", "vmd",
"Sierra VMD format", "Sierra VMD format",
sizeof(VmdDemuxContext), sizeof(VmdDemuxContext),
@ -328,9 +328,3 @@ static AVInputFormat vmd_demuxer = {
vmd_read_packet, vmd_read_packet,
vmd_read_close, vmd_read_close,
}; };
int vmd_init(void)
{
av_register_input_format(&vmd_demuxer);
return 0;
}

View File

@ -332,7 +332,7 @@ static int smacker_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat smacker_demuxer = { AVInputFormat smacker_demuxer = {
"smk", "smk",
"Smacker Video", "Smacker Video",
sizeof(SmackerContext), sizeof(SmackerContext),
@ -341,9 +341,3 @@ static AVInputFormat smacker_demuxer = {
smacker_read_packet, smacker_read_packet,
smacker_read_close, smacker_read_close,
}; };
int smacker_init(void)
{
av_register_input_format(&smacker_demuxer);
return 0;
}

View File

@ -146,7 +146,7 @@ static int sol_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat sol_demuxer = { AVInputFormat sol_demuxer = {
"sol", "sol",
"Sierra SOL Format", "Sierra SOL Format",
0, 0,
@ -156,9 +156,3 @@ static AVInputFormat sol_demuxer = {
sol_read_close, sol_read_close,
pcm_read_seek, pcm_read_seek,
}; };
int sol_init(void)
{
av_register_input_format(&sol_demuxer);
return 0;
}

View File

@ -899,7 +899,8 @@ static int swf_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat swf_demuxer = { #ifdef CONFIG_SWF_DEMUXER
AVInputFormat swf_demuxer = {
"swf", "swf",
"Flash format", "Flash format",
sizeof(SWFContext), sizeof(SWFContext),
@ -908,9 +909,9 @@ static AVInputFormat swf_demuxer = {
swf_read_packet, swf_read_packet,
swf_read_close, swf_read_close,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_SWF_MUXER
static AVOutputFormat swf_muxer = { AVOutputFormat swf_muxer = {
"swf", "swf",
"Flash format", "Flash format",
"application/x-shockwave-flash", "application/x-shockwave-flash",
@ -922,13 +923,4 @@ static AVOutputFormat swf_muxer = {
swf_write_packet, swf_write_packet,
swf_write_trailer, swf_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif
int swf_init(void)
{
av_register_input_format(&swf_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&swf_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -149,9 +149,3 @@ AVInputFormat tta_demuxer = {
tta_read_close, tta_read_close,
.extensions = "tta", .extensions = "tta",
}; };
int tta_init(void)
{
av_register_input_format(&tta_demuxer);
return 0;
}

View File

@ -90,11 +90,13 @@ AVOutputFormat *guess_format(const char *short_name, const char *filename,
int score_max, score; int score_max, score;
/* specific test for image sequences */ /* specific test for image sequences */
#ifdef CONFIG_IMAGE2_MUXER
if (!short_name && filename && if (!short_name && filename &&
filename_number_test(filename) >= 0 && filename_number_test(filename) >= 0 &&
av_guess_image2_codec(filename) != CODEC_ID_NONE) { av_guess_image2_codec(filename) != CODEC_ID_NONE) {
return guess_format("image2", NULL, NULL); return guess_format("image2", NULL, NULL);
} }
#endif
if (!short_name && filename && if (!short_name && filename &&
filename_number_test(filename) >= 0 && filename_number_test(filename) >= 0 &&
guess_image_format(filename)) { guess_image_format(filename)) {
@ -151,9 +153,11 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
if(type == CODEC_TYPE_VIDEO){ if(type == CODEC_TYPE_VIDEO){
enum CodecID codec_id= CODEC_ID_NONE; enum CodecID codec_id= CODEC_ID_NONE;
#ifdef CONFIG_IMAGE2_MUXER
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){ if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
codec_id= av_guess_image2_codec(filename); codec_id= av_guess_image2_codec(filename);
} }
#endif
if(codec_id == CODEC_ID_NONE) if(codec_id == CODEC_ID_NONE)
codec_id= fmt->video_codec; codec_id= fmt->video_codec;
return codec_id; return codec_id;
@ -1730,7 +1734,9 @@ static void av_estimate_timings(AVFormatContext *ic)
} }
ic->file_size = file_size; ic->file_size = file_size;
if ((ic->iformat == &mpegps_demuxer || ic->iformat == &mpegts_demuxer) && file_size && !ic->pb.is_streamed) { if ((!strcmp(ic->iformat->name, "mpeg") ||
!strcmp(ic->iformat->name, "mpegts")) &&
file_size && !ic->pb.is_streamed) {
/* get accurate estimate from the PTSes */ /* get accurate estimate from the PTSes */
av_estimate_timings_from_pts(ic); av_estimate_timings_from_pts(ic);
} else if (av_has_timings(ic)) { } else if (av_has_timings(ic)) {

View File

@ -522,7 +522,7 @@ static int v4l2_read_close(AVFormatContext *s1)
return 0; return 0;
} }
static AVInputFormat v4l2_demuxer = { AVInputFormat v4l2_demuxer = {
"video4linux2", "video4linux2",
"video grab", "video grab",
sizeof(struct video_data), sizeof(struct video_data),
@ -532,9 +532,3 @@ static AVInputFormat v4l2_demuxer = {
v4l2_read_close, v4l2_read_close,
.flags = AVFMT_NOFILE, .flags = AVFMT_NOFILE,
}; };
int v4l2_init(void)
{
av_register_input_format(&v4l2_demuxer);
return 0;
}

View File

@ -173,7 +173,7 @@ static int voc_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat voc_demuxer = { AVInputFormat voc_demuxer = {
"voc", "voc",
"Creative Voice File format", "Creative Voice File format",
sizeof(voc_dec_context_t), sizeof(voc_dec_context_t),
@ -256,7 +256,7 @@ static int voc_write_trailer(AVFormatContext *s)
return 0; return 0;
} }
static AVOutputFormat voc_muxer = { AVOutputFormat voc_muxer = {
"voc", "voc",
"Creative Voice File format", "Creative Voice File format",
"audio/x-voc", "audio/x-voc",
@ -270,15 +270,3 @@ static AVOutputFormat voc_muxer = {
}; };
#endif /* CONFIG_MUXERS */ #endif /* CONFIG_MUXERS */
int voc_init(void)
{
#ifdef CONFIG_DEMUXERS
av_register_input_format(&voc_demuxer);
#endif /* CONFIG_DEMUXERS */
#ifdef CONFIG_MUXERS
av_register_output_format(&voc_muxer);
#endif /* CONFIG_MUXERS */
return 0;
}

View File

@ -404,8 +404,8 @@ static int wav_read_seek(AVFormatContext *s,
return pcm_read_seek(s, stream_index, timestamp, flags); return pcm_read_seek(s, stream_index, timestamp, flags);
} }
#ifdef CONFIG_WAV_DEMUXER
static AVInputFormat wav_demuxer = { AVInputFormat wav_demuxer = {
"wav", "wav",
"wav format", "wav format",
sizeof(WAVContext), sizeof(WAVContext),
@ -415,9 +415,9 @@ static AVInputFormat wav_demuxer = {
wav_read_close, wav_read_close,
wav_read_seek, wav_read_seek,
}; };
#endif
#ifdef CONFIG_MUXERS #ifdef CONFIG_WAV_MUXER
static AVOutputFormat wav_muxer = { AVOutputFormat wav_muxer = {
"wav", "wav",
"wav format", "wav format",
"audio/x-wav", "audio/x-wav",
@ -429,13 +429,4 @@ static AVOutputFormat wav_muxer = {
wav_write_packet, wav_write_packet,
wav_write_trailer, wav_write_trailer,
}; };
#endif //CONFIG_MUXERS #endif
int ff_wav_init(void)
{
av_register_input_format(&wav_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&wav_muxer);
#endif //CONFIG_MUXERS
return 0;
}

View File

@ -381,7 +381,7 @@ static int wc3_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat wc3_demuxer = { AVInputFormat wc3_demuxer = {
"wc3movie", "wc3movie",
"Wing Commander III movie format", "Wing Commander III movie format",
sizeof(Wc3DemuxContext), sizeof(Wc3DemuxContext),
@ -390,9 +390,3 @@ static AVInputFormat wc3_demuxer = {
wc3_read_packet, wc3_read_packet,
wc3_read_close, wc3_read_close,
}; };
int wc3_init(void)
{
av_register_input_format(&wc3_demuxer);
return 0;
}

View File

@ -357,7 +357,8 @@ static int wsvqa_read_close(AVFormatContext *s)
return 0; return 0;
} }
static AVInputFormat wsaud_demuxer = { #ifdef CONFIG_WSAUD_DEMUXER
AVInputFormat wsaud_demuxer = {
"wsaud", "wsaud",
"Westwood Studios audio format", "Westwood Studios audio format",
sizeof(WsAudDemuxContext), sizeof(WsAudDemuxContext),
@ -366,8 +367,9 @@ static AVInputFormat wsaud_demuxer = {
wsaud_read_packet, wsaud_read_packet,
wsaud_read_close, wsaud_read_close,
}; };
#endif
static AVInputFormat wsvqa_demuxer = { #ifdef CONFIG_WSVQA_DEMUXER
AVInputFormat wsvqa_demuxer = {
"wsvqa", "wsvqa",
"Westwood Studios VQA format", "Westwood Studios VQA format",
sizeof(WsVqaDemuxContext), sizeof(WsVqaDemuxContext),
@ -376,10 +378,4 @@ static AVInputFormat wsvqa_demuxer = {
wsvqa_read_packet, wsvqa_read_packet,
wsvqa_read_close, wsvqa_read_close,
}; };
#endif
int westwood_init(void)
{
av_register_input_format(&wsaud_demuxer);
av_register_input_format(&wsvqa_demuxer);
return 0;
}

View File

@ -27,8 +27,6 @@ struct frame_attributes {
int top_field_first; int top_field_first;
}; };
#ifdef CONFIG_MUXERS
static int yuv4_generate_header(AVFormatContext *s, char* buf) static int yuv4_generate_header(AVFormatContext *s, char* buf)
{ {
AVStream *st; AVStream *st;
@ -171,6 +169,7 @@ static int yuv4_write_trailer(AVFormatContext *s)
return 0; return 0;
} }
#ifdef CONFIG_YUV4MPEGPIPE_MUXER
AVOutputFormat yuv4mpegpipe_muxer = { AVOutputFormat yuv4mpegpipe_muxer = {
"yuv4mpegpipe", "yuv4mpegpipe",
"YUV4MPEG pipe format", "YUV4MPEG pipe format",
@ -184,7 +183,7 @@ AVOutputFormat yuv4mpegpipe_muxer = {
yuv4_write_trailer, yuv4_write_trailer,
.flags = AVFMT_RAWPICTURE, .flags = AVFMT_RAWPICTURE,
}; };
#endif //CONFIG_MUXERS #endif
/* Header size increased to allow room for optional flags */ /* Header size increased to allow room for optional flags */
#define MAX_YUV4_HEADER 80 #define MAX_YUV4_HEADER 80
@ -393,6 +392,7 @@ static int yuv4_probe(AVProbeData *pd)
return 0; return 0;
} }
#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
AVInputFormat yuv4mpegpipe_demuxer = { AVInputFormat yuv4mpegpipe_demuxer = {
"yuv4mpegpipe", "yuv4mpegpipe",
"YUV4MPEG pipe format", "YUV4MPEG pipe format",
@ -403,13 +403,4 @@ AVInputFormat yuv4mpegpipe_demuxer = {
yuv4_read_close, yuv4_read_close,
.extensions = "y4m" .extensions = "y4m"
}; };
#endif
int yuv4mpeg_init(void)
{
av_register_input_format(&yuv4mpegpipe_demuxer);
#ifdef CONFIG_MUXERS
av_register_output_format(&yuv4mpegpipe_muxer);
#endif //CONFIG_MUXERS
return 0;
}