Revision c08fb000

View differences:

configure
135 135
  echo "  --disable-debug          disable debugging symbols"
136 136
  echo "  --disable-mpegaudio-hp   faster (but less accurate)"
137 137
  echo "                           MPEG audio decoding [default=no]"
138
  echo "  --disable-protocols      disable I/O protocols support [default=no]"
139 138
  echo "  --disable-ffmpeg         disable ffmpeg build"
140 139
  echo "  --disable-ffserver       disable ffserver build"
141 140
  echo "  --disable-ffplay         disable ffplay build"
......
156 155
  echo "  --enable-parser=NAME     enables parser NAME"
157 156
  echo "  --disable-parser=NAME    disables parser NAME"
158 157
  echo "  --disable-parsers        disables all parsers"
158
  echo "  --enable-protocol=NAME   enables protocol NAME"
159
  echo "  --disable-protocol=NAME  disables protocol NAME"
160
  echo "  --disable-protocols      disables all protocols"
159 161
  echo
160 162
  echo "Developer options (useful when working on FFmpeg itself):"
161 163
  echo "  --enable-gprof           enable profiling with gprof [$gprof]"
......
707 709
libnut_muxer_deps="libnut"
708 710
ogg_muxer_deps="libogg"
709 711
redir_demuxer_deps="network"
710
rtp_muxer_deps="network mpegts_demuxer"
711
rtsp_demuxer_deps="network"
712
sdp_demuxer_deps="network"
712
rtp_muxer_deps="mpegts_demuxer"
713
rtsp_demuxer_deps="rtp_protocol rtp_muxer"
714
sdp_demuxer_deps="rtsp_demuxer"
713 715
v4l2_demuxer_deps="v4l2"
714 716
video_grab_bktr_demuxer_deps="bktr"
715 717
video_grab_v4l_demuxer_deps="v4l"
716 718
x11_grab_device_demuxer_deps="x11grab"
717 719

  
720
http_protocol_deps="network"
721
rtp_protocol_deps="udp_protocol"
722
tcp_protocol_deps="network"
723
udp_protocol_deps="network"
724

  
718 725
ffplay_deps="sdl"
719
ffserver_deps="network muxers"
720
network_deps="protocols"
726
ffserver_deps="muxers rtp_protocol"
721 727

  
722 728
# set temporary file name
723 729
if test ! -z "$TMPDIR" ; then
......
883 889
PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"`
884 890
MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"`
885 891
DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"`
892
PROTOCOL_LIST=`sed -n 's/^[^#]*PROTOCOL.*, *\(.*\)).*/\1_protocol/p' "$source_path/libavformat/allformats.c"`
886 893

  
887
enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST
894
enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST $PROTOCOL_LIST
888 895

  
889 896
die_unknown(){
890 897
    echo "Unknown option \"$1\"."
......
951 958
  ;;
952 959
  --disable-parsers) disable $PARSER_LIST
953 960
  ;;
961
  --disable-protocols) disable $PROTOCOL_LIST
962
  ;;
954 963
  --enable-*=*|--disable-*=*)
955 964
  eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'`
956 965
  case "$thing" in
957
      encoder|decoder|muxer|demuxer|parser) $action ${optval}_${thing} ;;
966
      encoder|decoder|muxer|demuxer|parser|protocol) $action ${optval}_${thing} ;;
958 967
      *) die_unknown "$opt" ;;
959 968
  esac
960 969
  ;;
......
1777 1786
enabled_any $DECODER_LIST && enable decoders
1778 1787
enabled_any $MUXER_LIST   && enable muxers
1779 1788
enabled_any $DEMUXER_LIST && enable demuxers
1789
enabled_any $PROTOCOL_LIST && enable protocols
1780 1790

  
1781 1791
enabled_any $THREADS_LIST && enable threads
1782 1792

  
1783 1793
check_deps $CONFIG_LIST $HAVE_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST \
1784
    $DEMUXER_LIST $MUXER_LIST
1794
    $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST
1785 1795

  
1786 1796
enabled libogg    && append pkg_requires "ogg >= 1.1"
1787 1797
enabled libtheora && append pkg_requires "theora"
......
2001 2011
fi
2002 2012

  
2003 2013

  
2004
for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
2014
for part in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST $PROTOCOL_LIST; do
2005 2015
    ucname="`toupper $part`"
2006 2016
    config_name="CONFIG_$ucname"
2007 2017
    enabled_name="ENABLE_$ucname"
libavformat/Makefile
117 117
OBJS-$(CONFIG_RAWVIDEO_MUXER)            += raw.o
118 118
OBJS-$(CONFIG_SHORTEN_DEMUXER)           += raw.o
119 119
OBJS-$(CONFIG_NUT_DEMUXER)               += nutdec.o riff.o
120
OBJS-$(CONFIG_REDIR_DEMUXER)             += rtsp.o
120 121
OBJS-$(CONFIG_RM_DEMUXER)                += rm.o
121 122
OBJS-$(CONFIG_RM_MUXER)                  += rm.o
123
OBJS-$(CONFIG_RTP_MUXER)                 += rtp.o rtp_h264.o
124
OBJS-$(CONFIG_RTSP_DEMUXER)              += rtsp.o
122 125
OBJS-$(CONFIG_SEGAFILM_DEMUXER)          += segafilm.o
123 126
OBJS-$(CONFIG_VMD_DEMUXER)               += sierravmd.o
127
OBJS-$(CONFIG_SDP_DEMUXER)               += rtsp.o
124 128
OBJS-$(CONFIG_SMACKER_DEMUXER)           += smacker.o
125 129
OBJS-$(CONFIG_SOL_DEMUXER)               += sol.o
126 130
OBJS-$(CONFIG_SWF_DEMUXER)               += swf.o
......
158 162
# protocols I/O
159 163
OBJS+= avio.o aviobuf.o
160 164

  
161
OBJS-$(CONFIG_PROTOCOLS)                 += file.o
162
OBJS-$(CONFIG_NETWORK)                   += udp.o tcp.o http.o rtsp.o rtp.o \
163
                                            rtpproto.o rtp_h264.o
165
OBJS-$(CONFIG_FILE_PROTOCOL)             += file.o
166
OBJS-$(CONFIG_HTTP_PROTOCOL)             += http.o
167
OBJS-$(CONFIG_PIPE_PROTOCOL)             += file.o
168
OBJS-$(CONFIG_RTP_PROTOCOL)              += rtpproto.o
169
OBJS-$(CONFIG_TCP_PROTOCOL)              += tcp.o
170
OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
164 171

  
165 172
NAME=avformat
166 173
LIBVERSION=$(LAVFVERSION)
libavformat/allformats.c
26 26
#define REGISTER_DEMUXER(X,x) \
27 27
          if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer)
28 28
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
29
#define REGISTER_PROTOCOL(X,x) \
30
          if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol)
29 31

  
30 32
/* If you do not call this function, then you can select exactly which
31 33
   formats you want to support */
......
162 164
    REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
163 165
    REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
164 166

  
165
#ifdef CONFIG_PROTOCOLS
166
    /* file protocols */
167
    register_protocol(&file_protocol);
168
    register_protocol(&pipe_protocol);
169
#ifdef CONFIG_NETWORK
170
    register_protocol(&udp_protocol);
171
    register_protocol(&rtp_protocol);
172
    register_protocol(&tcp_protocol);
173
    register_protocol(&http_protocol);
174
#endif
175
#endif
167
    REGISTER_PROTOCOL(FILE, file);
168
    REGISTER_PROTOCOL(HTTP, http);
169
    REGISTER_PROTOCOL(PIPE, pipe);
170
    REGISTER_PROTOCOL(RTP, rtp);
171
    REGISTER_PROTOCOL(TCP, tcp);
172
    REGISTER_PROTOCOL(UDP, udp);
176 173
}

Also available in: Unified diff