Make protocols configure selectable and also cleanup the CONFIG_NETWORK
related parts (rtp,rtsp,sdp). Currently they are interdependent. Originally committed as revision 8842 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9686292664
commit
c08fb00016
30
configure
vendored
30
configure
vendored
@ -135,7 +135,6 @@ show_help(){
|
|||||||
echo " --disable-debug disable debugging symbols"
|
echo " --disable-debug disable debugging symbols"
|
||||||
echo " --disable-mpegaudio-hp faster (but less accurate)"
|
echo " --disable-mpegaudio-hp faster (but less accurate)"
|
||||||
echo " MPEG audio decoding [default=no]"
|
echo " MPEG audio decoding [default=no]"
|
||||||
echo " --disable-protocols disable I/O protocols support [default=no]"
|
|
||||||
echo " --disable-ffmpeg disable ffmpeg build"
|
echo " --disable-ffmpeg disable ffmpeg build"
|
||||||
echo " --disable-ffserver disable ffserver build"
|
echo " --disable-ffserver disable ffserver build"
|
||||||
echo " --disable-ffplay disable ffplay build"
|
echo " --disable-ffplay disable ffplay build"
|
||||||
@ -156,6 +155,9 @@ show_help(){
|
|||||||
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"
|
||||||
echo " --disable-parsers disables all parsers"
|
echo " --disable-parsers disables all parsers"
|
||||||
|
echo " --enable-protocol=NAME enables protocol NAME"
|
||||||
|
echo " --disable-protocol=NAME disables protocol NAME"
|
||||||
|
echo " --disable-protocols disables all protocols"
|
||||||
echo
|
echo
|
||||||
echo "Developer options (useful when working on FFmpeg itself):"
|
echo "Developer options (useful when working on FFmpeg itself):"
|
||||||
echo " --enable-gprof enable profiling with gprof [$gprof]"
|
echo " --enable-gprof enable profiling with gprof [$gprof]"
|
||||||
@ -707,17 +709,21 @@ libnut_demuxer_deps="libnut"
|
|||||||
libnut_muxer_deps="libnut"
|
libnut_muxer_deps="libnut"
|
||||||
ogg_muxer_deps="libogg"
|
ogg_muxer_deps="libogg"
|
||||||
redir_demuxer_deps="network"
|
redir_demuxer_deps="network"
|
||||||
rtp_muxer_deps="network mpegts_demuxer"
|
rtp_muxer_deps="mpegts_demuxer"
|
||||||
rtsp_demuxer_deps="network"
|
rtsp_demuxer_deps="rtp_protocol rtp_muxer"
|
||||||
sdp_demuxer_deps="network"
|
sdp_demuxer_deps="rtsp_demuxer"
|
||||||
v4l2_demuxer_deps="v4l2"
|
v4l2_demuxer_deps="v4l2"
|
||||||
video_grab_bktr_demuxer_deps="bktr"
|
video_grab_bktr_demuxer_deps="bktr"
|
||||||
video_grab_v4l_demuxer_deps="v4l"
|
video_grab_v4l_demuxer_deps="v4l"
|
||||||
x11_grab_device_demuxer_deps="x11grab"
|
x11_grab_device_demuxer_deps="x11grab"
|
||||||
|
|
||||||
|
http_protocol_deps="network"
|
||||||
|
rtp_protocol_deps="udp_protocol"
|
||||||
|
tcp_protocol_deps="network"
|
||||||
|
udp_protocol_deps="network"
|
||||||
|
|
||||||
ffplay_deps="sdl"
|
ffplay_deps="sdl"
|
||||||
ffserver_deps="network muxers"
|
ffserver_deps="muxers rtp_protocol"
|
||||||
network_deps="protocols"
|
|
||||||
|
|
||||||
# set temporary file name
|
# set temporary file name
|
||||||
if test ! -z "$TMPDIR" ; then
|
if test ! -z "$TMPDIR" ; then
|
||||||
@ -883,8 +889,9 @@ DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/liba
|
|||||||
PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"`
|
PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"`
|
||||||
MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.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"`
|
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
|
enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST $PROTOCOL_LIST
|
||||||
|
|
||||||
die_unknown(){
|
die_unknown(){
|
||||||
echo "Unknown option \"$1\"."
|
echo "Unknown option \"$1\"."
|
||||||
@ -951,10 +958,12 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--disable-parsers) disable $PARSER_LIST
|
--disable-parsers) disable $PARSER_LIST
|
||||||
;;
|
;;
|
||||||
|
--disable-protocols) disable $PROTOCOL_LIST
|
||||||
|
;;
|
||||||
--enable-*=*|--disable-*=*)
|
--enable-*=*|--disable-*=*)
|
||||||
eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
|
eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
|
||||||
case "$thing" in
|
case "$thing" in
|
||||||
encoder|decoder|muxer|demuxer|parser) $action ${optval}_${thing} ;;
|
encoder|decoder|muxer|demuxer|parser|protocol) $action ${optval}_${thing} ;;
|
||||||
*) die_unknown "$opt" ;;
|
*) die_unknown "$opt" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@ -1777,11 +1786,12 @@ enabled_any $ENCODER_LIST && enable encoders
|
|||||||
enabled_any $DECODER_LIST && enable decoders
|
enabled_any $DECODER_LIST && enable decoders
|
||||||
enabled_any $MUXER_LIST && enable muxers
|
enabled_any $MUXER_LIST && enable muxers
|
||||||
enabled_any $DEMUXER_LIST && enable demuxers
|
enabled_any $DEMUXER_LIST && enable demuxers
|
||||||
|
enabled_any $PROTOCOL_LIST && enable protocols
|
||||||
|
|
||||||
enabled_any $THREADS_LIST && enable threads
|
enabled_any $THREADS_LIST && enable threads
|
||||||
|
|
||||||
check_deps $CONFIG_LIST $HAVE_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST \
|
check_deps $CONFIG_LIST $HAVE_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST \
|
||||||
$DEMUXER_LIST $MUXER_LIST
|
$DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST
|
||||||
|
|
||||||
enabled libogg && append pkg_requires "ogg >= 1.1"
|
enabled libogg && append pkg_requires "ogg >= 1.1"
|
||||||
enabled libtheora && append pkg_requires "theora"
|
enabled libtheora && append pkg_requires "theora"
|
||||||
@ -2001,7 +2011,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
|
for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST; do
|
||||||
ucname="`toupper $part`"
|
ucname="`toupper $part`"
|
||||||
config_name="CONFIG_$ucname"
|
config_name="CONFIG_$ucname"
|
||||||
enabled_name="ENABLE_$ucname"
|
enabled_name="ENABLE_$ucname"
|
||||||
|
@ -117,10 +117,14 @@ OBJS-$(CONFIG_RAWVIDEO_DEMUXER) += raw.o
|
|||||||
OBJS-$(CONFIG_RAWVIDEO_MUXER) += raw.o
|
OBJS-$(CONFIG_RAWVIDEO_MUXER) += raw.o
|
||||||
OBJS-$(CONFIG_SHORTEN_DEMUXER) += raw.o
|
OBJS-$(CONFIG_SHORTEN_DEMUXER) += raw.o
|
||||||
OBJS-$(CONFIG_NUT_DEMUXER) += nutdec.o riff.o
|
OBJS-$(CONFIG_NUT_DEMUXER) += nutdec.o riff.o
|
||||||
|
OBJS-$(CONFIG_REDIR_DEMUXER) += rtsp.o
|
||||||
OBJS-$(CONFIG_RM_DEMUXER) += rm.o
|
OBJS-$(CONFIG_RM_DEMUXER) += rm.o
|
||||||
OBJS-$(CONFIG_RM_MUXER) += rm.o
|
OBJS-$(CONFIG_RM_MUXER) += rm.o
|
||||||
|
OBJS-$(CONFIG_RTP_MUXER) += rtp.o rtp_h264.o
|
||||||
|
OBJS-$(CONFIG_RTSP_DEMUXER) += rtsp.o
|
||||||
OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o
|
OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o
|
||||||
OBJS-$(CONFIG_VMD_DEMUXER) += sierravmd.o
|
OBJS-$(CONFIG_VMD_DEMUXER) += sierravmd.o
|
||||||
|
OBJS-$(CONFIG_SDP_DEMUXER) += rtsp.o
|
||||||
OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o
|
OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o
|
||||||
OBJS-$(CONFIG_SOL_DEMUXER) += sol.o
|
OBJS-$(CONFIG_SOL_DEMUXER) += sol.o
|
||||||
OBJS-$(CONFIG_SWF_DEMUXER) += swf.o
|
OBJS-$(CONFIG_SWF_DEMUXER) += swf.o
|
||||||
@ -158,9 +162,12 @@ CPPOBJS-$(CONFIG_AUDIO_BEOS) += beosaudio.o
|
|||||||
# protocols I/O
|
# protocols I/O
|
||||||
OBJS+= avio.o aviobuf.o
|
OBJS+= avio.o aviobuf.o
|
||||||
|
|
||||||
OBJS-$(CONFIG_PROTOCOLS) += file.o
|
OBJS-$(CONFIG_FILE_PROTOCOL) += file.o
|
||||||
OBJS-$(CONFIG_NETWORK) += udp.o tcp.o http.o rtsp.o rtp.o \
|
OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o
|
||||||
rtpproto.o rtp_h264.o
|
OBJS-$(CONFIG_PIPE_PROTOCOL) += file.o
|
||||||
|
OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o
|
||||||
|
OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o
|
||||||
|
OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
|
||||||
|
|
||||||
NAME=avformat
|
NAME=avformat
|
||||||
LIBVERSION=$(LAVFVERSION)
|
LIBVERSION=$(LAVFVERSION)
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#define REGISTER_DEMUXER(X,x) \
|
#define REGISTER_DEMUXER(X,x) \
|
||||||
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer)
|
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer)
|
||||||
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
|
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
|
||||||
|
#define REGISTER_PROTOCOL(X,x) \
|
||||||
|
if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol)
|
||||||
|
|
||||||
/* If you do not call this function, then you can select exactly which
|
/* If you do not call this function, then you can select exactly which
|
||||||
formats you want to support */
|
formats you want to support */
|
||||||
@ -162,15 +164,10 @@ void av_register_all(void)
|
|||||||
REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
|
REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
|
||||||
REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
|
REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
|
||||||
|
|
||||||
#ifdef CONFIG_PROTOCOLS
|
REGISTER_PROTOCOL(FILE, file);
|
||||||
/* file protocols */
|
REGISTER_PROTOCOL(HTTP, http);
|
||||||
register_protocol(&file_protocol);
|
REGISTER_PROTOCOL(PIPE, pipe);
|
||||||
register_protocol(&pipe_protocol);
|
REGISTER_PROTOCOL(RTP, rtp);
|
||||||
#ifdef CONFIG_NETWORK
|
REGISTER_PROTOCOL(TCP, tcp);
|
||||||
register_protocol(&udp_protocol);
|
REGISTER_PROTOCOL(UDP, udp);
|
||||||
register_protocol(&rtp_protocol);
|
|
||||||
register_protocol(&tcp_protocol);
|
|
||||||
register_protocol(&http_protocol);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user