Revision 04f46ced

View differences:

configure
74 74
echo "  --disable-opts           disable compiler optimizations"
75 75
echo "  --disable-mpegaudio-hp   faster (but less accurate)"
76 76
echo "                           MPEG audio decoding [default=no]"
77
echo "  --disable-protocols      disable I/O protocols support [default=no]"
77 78
echo "  --disable-ffserver       disable ffserver build"
78 79
echo "  --disable-ffplay         disable ffplay build"
79 80
echo "  --enable-small           optimize for size instead of speed"
......
220 221
SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)'
221 222
netserver="no"
222 223
need_inet_aton="no"
224
protocols="yes"
223 225
ffserver="yes"
224 226
ffplay="yes"
225 227
LIBOBJFLAGS=""
......
551 553
  ;;
552 554
  --disable-mpegaudio-hp) mpegaudio_hp="no"
553 555
  ;;
556
  --disable-protocols) protocols="no"; network="no"; ffserver="no"
557
  ;;
554 558
  --disable-ffserver) ffserver="no"
555 559
  ;;
556 560
  --disable-ffplay) ffplay="no"
......
587 591
  ;;
588 592
  --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
589 593
  ;;
590
  --disable-muxers) muxers="no"
594
  --disable-muxers) muxers="no"; ffserver="no"
591 595
  ;;
592 596
  --disable-demuxers) demuxers="no"
593 597
  ;;
......
1731 1735
  echo "#define SIMPLE_IDCT 1" >> $TMPH
1732 1736
fi
1733 1737

  
1738
if test "$protocols" = "yes" ; then
1739
  echo "#define CONFIG_PROTOCOLS 1" >> $TMPH
1740
  echo "CONFIG_PROTOCOLS=yes" >> config.mak
1741
fi
1742

  
1734 1743
if test "$ffserver" = "yes" ; then
1735 1744
  echo "#define CONFIG_FFSERVER 1" >> $TMPH
1736 1745
  echo "CONFIG_FFSERVER=yes" >> config.mak
libavformat/Makefile
11 11
OBJS= utils.o cutils.o os_support.o allformats.o
12 12
PPOBJS=
13 13

  
14
# mux and demuxes
14
# demuxers
15 15
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
16 16
      avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17
      yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
17
      yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \
18 18
      nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
19
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o \
19
      sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \
20 20
      ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
21

  
22
# muxers
23
ifeq ($(CONFIG_MUXERS),yes)
24
OBJS+= flvenc.o movenc.o asf-enc.o
25
endif
26

  
27

  
21 28
AMROBJS=
22 29
ifeq ($(AMR_NB),yes)
23 30
AMROBJS= amr.o
......
32 39

  
33 40
# image formats
34 41
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
35
# file I/O
36
OBJS+= avio.o aviobuf.o file.o
37 42
OBJS+= framehook.o
38 43

  
39 44
ifeq ($(CONFIG_VIDEO4LINUX),yes)
......
62 67
PPOBJS+= beosaudio.o
63 68
endif
64 69

  
70
# protocols I/O
71
OBJS+= avio.o aviobuf.o
72

  
73
ifeq ($(CONFIG_PROTOCOLS),yes)
74
OBJS+= file.o
65 75
ifeq ($(CONFIG_NETWORK),yes)
66 76
OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
67 77
# BeOS and Darwin network stuff
......
69 79
OBJS+= barpainet.o
70 80
endif
71 81
endif
82
endif
72 83

  
73 84
ifeq ($(CONFIG_LIBOGG),yes)
74 85
OBJS+= ogg.o
libavformat/allformats.c
130 130
//    av_register_image_format(&sgi_image_format); heap corruption, dont enable
131 131
#endif //CONFIG_MUXERS
132 132

  
133
#ifdef CONFIG_PROTOCOLS
133 134
    /* file protocols */
134 135
    register_protocol(&file_protocol);
135 136
    register_protocol(&pipe_protocol);
......
141 142
    register_protocol(&tcp_protocol);
142 143
    register_protocol(&http_protocol);
143 144
#endif
145
#endif
144 146
}
libavformat/avio.c
100 100
    return ret;
101 101
}
102 102

  
103
#ifdef CONFIG_MUXERS
103
#if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS)
104 104
int url_write(URLContext *h, unsigned char *buf, int size)
105 105
{
106 106
    int ret;
......
112 112
    ret = h->prot->url_write(h, buf, size);
113 113
    return ret;
114 114
}
115
#endif //CONFIG_MUXERS
115
#endif //CONFIG_MUXERS || CONFIG_PROTOCOLS
116 116

  
117 117
offset_t url_seek(URLContext *h, offset_t pos, int whence)
118 118
{
libavformat/aviobuf.c
53 53
    return 0;
54 54
}
55 55

  
56

  
57
#ifdef CONFIG_MUXERS
58 56
static void flush_buffer(ByteIOContext *s)
59 57
{
60 58
    if (s->buf_ptr > s->buffer) {
......
104 102
    flush_buffer(s);
105 103
    s->must_flush = 0;
106 104
}
107
#endif //CONFIG_MUXERS
108 105

  
109 106
offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
110 107
{
......
193 190
    return s->error;
194 191
}
195 192

  
196
#ifdef CONFIG_MUXERS
193
#if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS)
197 194
void put_le32(ByteIOContext *s, unsigned int val)
198 195
{
199 196
    put_byte(s, val);
......
254 251
        put_byte(s, *tag++);
255 252
    }
256 253
}
257
#endif //CONFIG_MUXERS
254
#endif //CONFIG_MUXERS || CONFIG_PROTOCOLS
258 255

  
259 256
/* Input stream */
260 257

  
libavformat/ffm.c
706 706
    return 0;
707 707
}
708 708

  
709
#ifdef CONFIG_FFSERVER
709 710
offset_t ffm_read_write_index(int fd)
710 711
{
711 712
    uint8_t buf[8];
......
737 738
    ffm->write_index = pos;
738 739
    ffm->file_size = file_size;
739 740
}
741
#endif // CONFIG_FFSERVER
740 742

  
741 743
static int ffm_read_close(AVFormatContext *s)
742 744
{

Also available in: Unified diff