diff options
Diffstat (limited to 'libavformat')
39 files changed, 179 insertions, 179 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c index 8bd69c200e..70569ed5a9 100644 --- a/libavformat/aiff.c +++ b/libavformat/aiff.c @@ -170,7 +170,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec, return num_frames; } -#ifdef CONFIG_AIFF_MUXER +#if CONFIG_AIFF_MUXER typedef struct { int64_t form; int64_t frames; @@ -439,7 +439,7 @@ static int aiff_read_packet(AVFormatContext *s, return 0; } -#ifdef CONFIG_AIFF_DEMUXER +#if CONFIG_AIFF_DEMUXER AVInputFormat aiff_demuxer = { "aiff", NULL_IF_CONFIG_SMALL("Audio IFF"), @@ -453,7 +453,7 @@ AVInputFormat aiff_demuxer = { }; #endif -#ifdef CONFIG_AIFF_MUXER +#if CONFIG_AIFF_MUXER AVOutputFormat aiff_muxer = { "aiff", NULL_IF_CONFIG_SMALL("Audio IFF"), diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 43243f8062..387189a178 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -168,7 +168,7 @@ void av_register_all(void) REGISTER_MUXER (RTP, rtp); REGISTER_DEMUXER (RTSP, rtsp); REGISTER_DEMUXER (SDP, sdp); -#ifdef CONFIG_SDP_DEMUXER +#if CONFIG_SDP_DEMUXER av_register_rtp_dynamic_payload_handlers(); av_register_rdt_dynamic_payload_handlers(); #endif diff --git a/libavformat/amr.c b/libavformat/amr.c index 1f623512dc..cbc4ec50d4 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -30,7 +30,7 @@ Only mono files are supported. static const char AMR_header [] = "#!AMR\n"; static const char AMRWB_header [] = "#!AMR-WB\n"; -#ifdef CONFIG_AMR_MUXER +#if CONFIG_AMR_MUXER static int amr_write_header(AVFormatContext *s) { ByteIOContext *pb = s->pb; @@ -166,7 +166,7 @@ static int amr_read_packet(AVFormatContext *s, return 0; } -#ifdef CONFIG_AMR_DEMUXER +#if CONFIG_AMR_DEMUXER AVInputFormat amr_demuxer = { "amr", NULL_IF_CONFIG_SMALL("3GPP AMR file format"), @@ -178,7 +178,7 @@ AVInputFormat amr_demuxer = { }; #endif -#ifdef CONFIG_AMR_MUXER +#if CONFIG_AMR_MUXER AVOutputFormat amr_muxer = { "amr", NULL_IF_CONFIG_SMALL("3GPP AMR file format"), diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c index e1f3c1b6d9..94d208ffa6 100644 --- a/libavformat/asf-enc.c +++ b/libavformat/asf-enc.c @@ -812,14 +812,14 @@ static int asf_write_trailer(AVFormatContext *s) return 0; } -#ifdef CONFIG_ASF_MUXER +#if CONFIG_ASF_MUXER AVOutputFormat asf_muxer = { "asf", NULL_IF_CONFIG_SMALL("ASF format"), "video/x-ms-asf", "asf,wmv,wma", sizeof(ASFContext), -#ifdef CONFIG_LIBMP3LAME +#if CONFIG_LIBMP3LAME CODEC_ID_MP3, #else CODEC_ID_MP2, @@ -833,14 +833,14 @@ AVOutputFormat asf_muxer = { }; #endif -#ifdef CONFIG_ASF_STREAM_MUXER +#if CONFIG_ASF_STREAM_MUXER AVOutputFormat asf_stream_muxer = { "asf_stream", NULL_IF_CONFIG_SMALL("ASF format"), "video/x-ms-asf", "asf,wmv,wma", sizeof(ASFContext), -#ifdef CONFIG_LIBMP3LAME +#if CONFIG_LIBMP3LAME CODEC_ID_MP3, #else CODEC_ID_MP2, diff --git a/libavformat/au.c b/libavformat/au.c index 7d151cf1d6..caa7f4dff3 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -47,7 +47,7 @@ static const AVCodecTag codec_au_tags[] = { { 0, 0 }, }; -#ifdef CONFIG_AU_MUXER +#if CONFIG_AU_MUXER /* AUDIO_FILE header */ static int put_au_header(ByteIOContext *pb, AVCodecContext *enc) { @@ -177,7 +177,7 @@ static int au_read_packet(AVFormatContext *s, return 0; } -#ifdef CONFIG_AU_DEMUXER +#if CONFIG_AU_DEMUXER AVInputFormat au_demuxer = { "au", NULL_IF_CONFIG_SMALL("SUN AU format"), @@ -191,7 +191,7 @@ AVInputFormat au_demuxer = { }; #endif -#ifdef CONFIG_AU_MUXER +#if CONFIG_AU_MUXER AVOutputFormat au_muxer = { "au", NULL_IF_CONFIG_SMALL("SUN AU format"), diff --git a/libavformat/avienc.c b/libavformat/avienc.c index cea513f9c8..6267c77b20 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -27,7 +27,7 @@ * - fill all fields if non streamed (nb_frames for example) */ -#ifdef CONFIG_AVI_MUXER +#if CONFIG_AVI_MUXER typedef struct AVIIentry { unsigned int flags, pos, len; } AVIIentry; diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index d1dc09ba0f..aa6ad87dec 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -160,12 +160,12 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence) } else { int64_t res = AVERROR(EPIPE); -#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) +#if CONFIG_MUXERS || CONFIG_NETWORK if (s->write_flag) { flush_buffer(s); s->must_flush = 1; } -#endif /* defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) */ +#endif /* CONFIG_MUXERS || CONFIG_NETWORK */ if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0) return res; if (!s->write_flag) @@ -624,7 +624,7 @@ URLContext *url_fileno(ByteIOContext *s) return s->opaque; } -#ifdef CONFIG_MUXERS +#if CONFIG_MUXERS int url_fprintf(ByteIOContext *s, const char *fmt, ...) { va_list ap; @@ -688,8 +688,8 @@ int64_t av_url_read_fseek(ByteIOContext *s, int stream_index, } /* url_open_dyn_buf and url_close_dyn_buf are used in rtp.c to send a response - * back to the server even if CONFIG_MUXERS is not set. */ -#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) + * back to the server even if CONFIG_MUXERS is false. */ +#if CONFIG_MUXERS || CONFIG_NETWORK /* buffer handling */ int url_open_buf(ByteIOContext **s, uint8_t *buf, int buf_size, int flags) { diff --git a/libavformat/daud.c b/libavformat/daud.c index 2bca9478ea..cdd831ba4b 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -78,7 +78,7 @@ AVInputFormat daud_demuxer = { }; #endif -#ifdef CONFIG_DAUD_MUXER +#if CONFIG_DAUD_MUXER AVOutputFormat daud_muxer = { "daud", diff --git a/libavformat/dv.c b/libavformat/dv.c index a0e07e91ca..eb02e3bc4b 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -462,7 +462,7 @@ static int dv_read_close(AVFormatContext *s) return 0; } -#ifdef CONFIG_DV_DEMUXER +#if CONFIG_DV_DEMUXER AVInputFormat dv_demuxer = { "dv", NULL_IF_CONFIG_SMALL("DV video format"), diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index c8dc5a8301..428d4a0656 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -359,7 +359,7 @@ void dv_delete_mux(DVMuxContext *c) av_fifo_free(&c->audio_data[i]); } -#ifdef CONFIG_DV_MUXER +#if CONFIG_DV_MUXER static int dv_write_header(AVFormatContext *s) { if (!dv_init_mux(s)) { diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index fd859552d3..e5d98f11f8 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -22,7 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" #include "ffm.h" -#ifdef CONFIG_FFSERVER +#if CONFIG_FFSERVER #include <unistd.h> int64_t ffm_read_write_index(int fd) diff --git a/libavformat/file.c b/libavformat/file.c index 827541d1ae..88ac4db8d4 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -22,7 +22,7 @@ #include "libavutil/avstring.h" #include "avformat.h" #include <fcntl.h> -#ifdef HAVE_SETMODE +#if HAVE_SETMODE #include <io.h> #endif #include <unistd.h> @@ -107,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) fd = 0; } } -#ifdef HAVE_SETMODE +#if HAVE_SETMODE setmode(fd, O_BINARY); #endif h->priv_data = (void *)(size_t)fd; diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 6e3a3e4f82..27f96217c4 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -382,7 +382,7 @@ AVOutputFormat flv_muxer = { "video/x-flv", "flv", sizeof(FLVContext), -#ifdef CONFIG_LIBMP3LAME +#if CONFIG_LIBMP3LAME CODEC_ID_MP3, #else // CONFIG_LIBMP3LAME CODEC_ID_ADPCM_SWF, diff --git a/libavformat/framehook.c b/libavformat/framehook.c index 90815fb1d6..8dba5bc85c 100644 --- a/libavformat/framehook.c +++ b/libavformat/framehook.c @@ -23,7 +23,7 @@ #include "avformat.h" #include "framehook.h" -#ifdef HAVE_DLFCN_H +#if HAVE_DLFCN_H #include <dlfcn.h> #endif diff --git a/libavformat/img2.c b/libavformat/img2.c index c0b5de2144..244b050802 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -305,7 +305,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) } } -#if defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER) +#if CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER /******************************************************/ /* image output */ @@ -370,10 +370,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -#endif /* defined(CONFIG_IMAGE2_MUXER) || defined(CONFIG_IMAGE2PIPE_MUXER) */ +#endif /* CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER */ /* input */ -#ifdef CONFIG_IMAGE2_DEMUXER +#if CONFIG_IMAGE2_DEMUXER AVInputFormat image2_demuxer = { "image2", NULL_IF_CONFIG_SMALL("image2 sequence"), @@ -387,7 +387,7 @@ AVInputFormat image2_demuxer = { AVFMT_NOFILE, }; #endif -#ifdef CONFIG_IMAGE2PIPE_DEMUXER +#if CONFIG_IMAGE2PIPE_DEMUXER AVInputFormat image2pipe_demuxer = { "image2pipe", NULL_IF_CONFIG_SMALL("piped image2 sequence"), @@ -399,7 +399,7 @@ AVInputFormat image2pipe_demuxer = { #endif /* output */ -#ifdef CONFIG_IMAGE2_MUXER +#if CONFIG_IMAGE2_MUXER AVOutputFormat image2_muxer = { "image2", NULL_IF_CONFIG_SMALL("image2 sequence"), @@ -414,7 +414,7 @@ AVOutputFormat image2_muxer = { .flags= AVFMT_NOTIMESTAMPS | AVFMT_NOFILE }; #endif -#ifdef CONFIG_IMAGE2PIPE_MUXER +#if CONFIG_IMAGE2PIPE_MUXER AVOutputFormat image2pipe_muxer = { "image2pipe", NULL_IF_CONFIG_SMALL("piped image2 sequence"), diff --git a/libavformat/libnut.c b/libavformat/libnut.c index 3f4a69b2fb..a088551816 100644 --- a/libavformat/libnut.c +++ b/libavformat/libnut.c @@ -44,7 +44,7 @@ static const AVCodecTag nut_tags[] = { { 0, 0 }, }; -#ifdef CONFIG_LIBNUT_MUXER +#if CONFIG_LIBNUT_MUXER static int av_write(void * h, size_t len, const uint8_t * buf) { ByteIOContext * bc = h; put_buffer(bc, buf, len); diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 710214284b..e23d03b897 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -39,10 +39,10 @@ #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" #include "libavutil/lzo.h" -#ifdef CONFIG_ZLIB +#if CONFIG_ZLIB #include <zlib.h> #endif -#ifdef CONFIG_BZLIB +#if CONFIG_BZLIB #include <bzlib.h> #endif @@ -879,7 +879,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, goto failed; pkt_size -= olen; break; -#ifdef CONFIG_ZLIB +#if CONFIG_ZLIB case MATROSKA_TRACK_ENCODING_COMP_ZLIB: { z_stream zstream = {0}; if (inflateInit(&zstream) != Z_OK) @@ -900,7 +900,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, break; } #endif -#ifdef CONFIG_BZLIB +#if CONFIG_BZLIB case MATROSKA_TRACK_ENCODING_COMP_BZLIB: { bz_stream bzstream = {0}; if (BZ2_bzDecompressInit(&bzstream, 0, 0) != BZ_OK) @@ -1147,10 +1147,10 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) } else if (encodings_list->nb_elem == 1) { if (encodings[0].type || (encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP && -#ifdef CONFIG_ZLIB +#if CONFIG_ZLIB encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB && #endif -#ifdef CONFIG_BZLIB +#if CONFIG_BZLIB encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB && #endif encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) { diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 5e6d4ebccb..7c2f4bf223 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -36,7 +36,7 @@ static int mmf_rate(int code) return mmf_rates[code]; } -#ifdef CONFIG_MMF_MUXER +#if CONFIG_MMF_MUXER static int mmf_rate_code(int rate) { int i; @@ -290,7 +290,7 @@ static int mmf_read_packet(AVFormatContext *s, return ret; } -#ifdef CONFIG_MMF_DEMUXER +#if CONFIG_MMF_DEMUXER AVInputFormat mmf_demuxer = { "mmf", NULL_IF_CONFIG_SMALL("mmf format"), @@ -302,7 +302,7 @@ AVInputFormat mmf_demuxer = { pcm_read_seek, }; #endif -#ifdef CONFIG_MMF_MUXER +#if CONFIG_MMF_MUXER AVOutputFormat mmf_muxer = { "mmf", NULL_IF_CONFIG_SMALL("mmf format"), diff --git a/libavformat/mov.c b/libavformat/mov.c index c842057b66..5638d34f80 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -31,7 +31,7 @@ #include "libavcodec/mpeg4audio.h" #include "libavcodec/mpegaudiodata.h" -#ifdef CONFIG_ZLIB +#if CONFIG_ZLIB #include <zlib.h> #endif @@ -1005,7 +1005,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) /* special codec parameters handling */ switch (st->codec->codec_id) { -#ifdef CONFIG_DV_DEMUXER +#if CONFIG_DV_DEMUXER case CODEC_ID_DVAUDIO: c->dv_fctx = av_alloc_format_context(); c->dv_demux = dv_init_demux(c->dv_fctx); @@ -1380,13 +1380,13 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) sc->pb = c->fc->pb; switch (st->codec->codec_id) { -#ifdef CONFIG_H261_DECODER +#if CONFIG_H261_DECODER case CODEC_ID_H261: #endif -#ifdef CONFIG_H263_DECODER +#if CONFIG_H263_DECODER case CODEC_ID_H263: #endif -#ifdef CONFIG_MPEG4_DECODER +#if CONFIG_MPEG4_DECODER case CODEC_ID_MPEG4: #endif st->codec->width= 0; /* let decoder init width/height */ @@ -1691,7 +1691,7 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOVAtom atom) static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { -#ifdef CONFIG_ZLIB +#if CONFIG_ZLIB ByteIOContext ctx; uint8_t *cmov_data; uint8_t *moov_data; /* uncompressed data */ @@ -1939,7 +1939,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) return -1; } av_get_packet(sc->pb, pkt, sample->size); -#ifdef CONFIG_DV_DEMUXER +#if CONFIG_DV_DEMUXER if (mov->dv_demux && sc->dv_audio_container) { dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); av_free(pkt->data); diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 16e8fce1ae..7127cc4401 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1819,7 +1819,7 @@ static int mov_write_trailer(AVFormatContext *s) return res; } -#ifdef CONFIG_MOV_MUXER +#if CONFIG_MOV_MUXER AVOutputFormat mov_muxer = { "mov", NULL_IF_CONFIG_SMALL("MOV format"), @@ -1835,7 +1835,7 @@ AVOutputFormat mov_muxer = { .codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0}, }; #endif -#ifdef CONFIG_TGP_MUXER +#if CONFIG_TGP_MUXER AVOutputFormat tgp_muxer = { "3gp", NULL_IF_CONFIG_SMALL("3GP format"), @@ -1851,7 +1851,7 @@ AVOutputFormat tgp_muxer = { .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, }; #endif -#ifdef CONFIG_MP4_MUXER +#if CONFIG_MP4_MUXER AVOutputFormat mp4_muxer = { "mp4", NULL_IF_CONFIG_SMALL("MP4 format"), @@ -1867,7 +1867,7 @@ AVOutputFormat mp4_muxer = { .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, }; #endif -#ifdef CONFIG_PSP_MUXER +#if CONFIG_PSP_MUXER AVOutputFormat psp_muxer = { "psp", NULL_IF_CONFIG_SMALL("PSP MP4 format"), @@ -1883,7 +1883,7 @@ AVOutputFormat psp_muxer = { .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, }; #endif -#ifdef CONFIG_TG2_MUXER +#if CONFIG_TG2_MUXER AVOutputFormat tg2_muxer = { "3g2", NULL_IF_CONFIG_SMALL("3GP2 format"), @@ -1899,7 +1899,7 @@ AVOutputFormat tg2_muxer = { .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, }; #endif -#ifdef CONFIG_IPOD_MUXER +#if CONFIG_IPOD_MUXER AVOutputFormat ipod_muxer = { "ipod", NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"), diff --git a/libavformat/mp3.c b/libavformat/mp3.c index a4eb49c5e7..0b1a167002 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -527,7 +527,7 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -#if defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER) +#if CONFIG_MP2_MUXER || CONFIG_MP3_MUXER static void id3v1_create_tag(AVFormatContext *s, uint8_t *buf) { int v, i; @@ -645,9 +645,9 @@ static int mp3_write_trailer(struct AVFormatContext *s) } return 0; } -#endif /* defined(CONFIG_MP2_MUXER) || defined(CONFIG_MP3_MUXER) */ +#endif /* CONFIG_MP2_MUXER || CONFIG_MP3_MUXER */ -#ifdef CONFIG_MP3_DEMUXER +#if CONFIG_MP3_DEMUXER AVInputFormat mp3_demuxer = { "mp3", NULL_IF_CONFIG_SMALL("MPEG audio"), @@ -659,12 +659,12 @@ AVInputFormat mp3_demuxer = { .extensions = "mp2,mp3,m2a", /* XXX: use probe */ }; #endif -#ifdef CONFIG_MP2_MUXER +#if CONFIG_MP2_MUXER AVOutputFormat mp2_muxer = { "mp2", NULL_IF_CONFIG_SMALL("MPEG audio layer 2"), "audio/x-mpeg", -#ifdef CONFIG_LIBMP3LAME +#if CONFIG_LIBMP3LAME "mp2,m2a", #else "mp2,mp3,m2a", @@ -677,7 +677,7 @@ AVOutputFormat mp2_muxer = { mp3_write_trailer, }; #endif -#ifdef CONFIG_MP3_MUXER +#if CONFIG_MP3_MUXER AVOutputFormat mp3_muxer = { "mp3", NULL_IF_CONFIG_SMALL("MPEG audio layer 3"), diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 4b86f20dff..e4fe6ca940 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1219,7 +1219,7 @@ static int mpeg_mux_end(AVFormatContext *ctx) return 0; } -#ifdef CONFIG_MPEG1SYSTEM_MUXER +#if CONFIG_MPEG1SYSTEM_MUXER AVOutputFormat mpeg1system_muxer = { "mpeg", NULL_IF_CONFIG_SMALL("MPEG-1 System format"), @@ -1233,7 +1233,7 @@ AVOutputFormat mpeg1system_muxer = { mpeg_mux_end, }; #endif -#ifdef CONFIG_MPEG1VCD_MUXER +#if CONFIG_MPEG1VCD_MUXER AVOutputFormat mpeg1vcd_muxer = { "vcd", NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"), @@ -1247,7 +1247,7 @@ AVOutputFormat mpeg1vcd_muxer = { mpeg_mux_end, }; #endif -#ifdef CONFIG_MPEG2VOB_MUXER +#if CONFIG_MPEG2VOB_MUXER AVOutputFormat mpeg2vob_muxer = { "vob", NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), @@ -1263,7 +1263,7 @@ AVOutputFormat mpeg2vob_muxer = { #endif /* Same as mpeg2vob_mux except that the pack size is 2324 */ -#ifdef CONFIG_MPEG2SVCD_MUXER +#if CONFIG_MPEG2SVCD_MUXER AVOutputFormat mpeg2svcd_muxer = { "svcd", NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), @@ -1279,7 +1279,7 @@ AVOutputFormat mpeg2svcd_muxer = { #endif /* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */ -#ifdef CONFIG_MPEG2DVD_MUXER +#if CONFIG_MPEG2DVD_MUXER AVOutputFormat mpeg2dvd_muxer = { "dvd", NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"), diff --git a/libavformat/network.h b/libavformat/network.h index a5904d93af..ef08b557e9 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -21,7 +21,7 @@ #ifndef AVFORMAT_NETWORK_H #define AVFORMAT_NETWORK_H -#ifdef HAVE_WINSOCK2_H +#if HAVE_WINSOCK2_H #include <winsock2.h> #include <ws2tcpip.h> @@ -38,7 +38,7 @@ #define FF_NETERROR(err) err #endif -#ifdef HAVE_ARPA_INET_H +#if HAVE_ARPA_INET_H #include <arpa/inet.h> #endif @@ -46,7 +46,7 @@ int ff_socket_nonblock(int socket, int enable); static inline int ff_network_init(void) { -#ifdef HAVE_WINSOCK2_H +#if HAVE_WINSOCK2_H WSADATA wsaData; if (WSAStartup(MAKEWORD(1,1), &wsaData)) return 0; @@ -56,12 +56,12 @@ static inline int ff_network_init(void) static inline void ff_network_close(void) { -#ifdef HAVE_WINSOCK2_H +#if HAVE_WINSOCK2_H WSACleanup(); #endif } -#if !defined(HAVE_INET_ATON) +#if !HAVE_INET_ATON /* in os_support.c */ int inet_aton (const char * str, struct in_addr * add); #endif diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 5bcc44df2c..4d838a5e95 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -906,7 +906,7 @@ static int nut_read_close(AVFormatContext *s) return 0; } -#ifdef CONFIG_NUT_DEMUXER +#if CONFIG_NUT_DEMUXER AVInputFormat nut_demuxer = { "nut", NULL_IF_CONFIG_SMALL("NUT format"), diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index edcb2c7219..1e5f733194 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -809,9 +809,9 @@ AVOutputFormat nut_muxer = { "video/x-nut", "nut", sizeof(NUTContext), -#ifdef CONFIG_LIBVORBIS +#if CONFIG_LIBVORBIS CODEC_ID_VORBIS, -#elif defined(CONFIG_LIBMP3LAME) +#elif CONFIG_LIBMP3LAME CODEC_ID_MP3, #else CODEC_ID_MP2, diff --git a/libavformat/os_support.c b/libavformat/os_support.c index e6dbc307dd..6763e39cf9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -30,18 +30,18 @@ #include <sys/time.h> #include "os_support.h" -#ifdef CONFIG_NETWORK -#ifndef HAVE_POLL_H -#ifdef HAVE_WINSOCK2_H +#if CONFIG_NETWORK +#if !HAVE_POLL_H +#if HAVE_WINSOCK2_H #include <winsock2.h> -#elif defined (HAVE_SYS_SELECT_H) +#elif HAVE_SYS_SELECT_H #include <sys/select.h> #endif #endif #include "network.h" -#if !defined(HAVE_INET_ATON) +#if !HAVE_INET_ATON #include <stdlib.h> #include <strings.h> @@ -58,7 +58,7 @@ int inet_aton (const char * str, struct in_addr * add) return 1; } -#endif /* !defined(HAVE_INET_ATON) */ +#endif /* !HAVE_INET_ATON */ /* resolve host with also IP address parsing */ int resolve_host(struct in_addr *sin_addr, const char *hostname) @@ -76,7 +76,7 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname) int ff_socket_nonblock(int socket, int enable) { -#ifdef HAVE_WINSOCK2_H +#if HAVE_WINSOCK2_H return ioctlsocket(socket, FIONBIO, &enable); #else if (enable) @@ -87,8 +87,8 @@ int ff_socket_nonblock(int socket, int enable) } #endif /* CONFIG_NETWORK */ -#ifdef CONFIG_FFSERVER -#ifndef HAVE_POLL_H +#if CONFIG_FFSERVER +#if !HAVE_POLL_H int poll(struct pollfd *fds, nfds_t numfds, int timeout) { fd_set read_set; @@ -98,7 +98,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) int n; int rc; -#ifdef HAVE_WINSOCK2_H +#if HAVE_WINSOCK2_H if (numfds >= FD_SETSIZE) { errno = EINVAL; return -1; @@ -113,7 +113,7 @@ int poll(struct pollfd *fds, nfds_t numfds, int timeout) for(i = 0; i < numfds; i++) { if (fds[i].fd < 0) continue; -#ifndef HAVE_WINSOCK2_H +#if !HAVE_WINSOCK2_H if (fds[i].fd >= FD_SETSIZE) { errno = EINVAL; return -1; diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 0b6a292d6d..165dc23a06 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -34,7 +34,7 @@ static inline int is_dos_path(const char *path) { -#ifdef HAVE_DOS_PATHS +#if HAVE_DOS_PATHS if (path[0] && path[1] == ':') return 1; #endif @@ -58,18 +58,18 @@ static inline int is_dos_path(const char *path) # endif #endif -#ifdef CONFIG_NETWORK -#ifndef HAVE_SOCKLEN_T +#if CONFIG_NETWORK +#if !HAVE_SOCKLEN_T typedef int socklen_t; #endif /* most of the time closing a socket is just closing an fd */ -#ifndef HAVE_CLOSESOCKET +#if !HAVE_CLOSESOCKET #define closesocket close #endif -#ifdef CONFIG_FFSERVER -#ifndef HAVE_POLL_H +#if CONFIG_FFSERVER +#if !HAVE_POLL_H typedef unsigned long nfds_t; struct pollfd { diff --git a/libavformat/raw.c b/libavformat/raw.c index b93cdccd1c..f3214ac01c 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -28,7 +28,7 @@ #include "raw.h" /* simple formats */ -#ifdef CONFIG_FLAC_MUXER +#if CONFIG_FLAC_MUXER static int flac_write_header(struct AVFormatContext *s) { static const uint8_t header[8] = { @@ -61,7 +61,7 @@ static int flac_write_trailer(struct AVFormatContext *s) } #endif -#ifdef CONFIG_ROQ_MUXER +#if CONFIG_ROQ_MUXER static int roq_write_header(struct AVFormatContext *s) { static const uint8_t header[] = { @@ -75,14 +75,14 @@ static int roq_write_header(struct AVFormatContext *s) } #endif -#ifdef CONFIG_NULL_MUXER +#if CONFIG_NULL_MUXER static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt) { return 0; } #endif -#ifdef CONFIG_MUXERS +#if CONFIG_MUXERS static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) { put_buffer(s->pb, pkt->data, pkt->size); @@ -91,7 +91,7 @@ static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt) } #endif -#ifdef CONFIG_DEMUXERS +#if CONFIG_DEMUXERS /* raw input */ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) { @@ -182,7 +182,7 @@ static int raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt) } #endif -#ifdef CONFIG_RAWVIDEO_DEMUXER +#if CONFIG_RAWVIDEO_DEMUXER static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) { int packet_size, ret, width, height; @@ -208,7 +208,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) } #endif -#ifdef CONFIG_INGENIENT_DEMUXER +#if CONFIG_INGENIENT_DEMUXER // http://www.artificis.hu/files/texts/ingenient.txt static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) { @@ -246,7 +246,7 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) } #endif -#ifdef CONFIG_DEMUXERS +#if CONFIG_DEMUXERS int pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { @@ -320,7 +320,7 @@ static int video_read_header(AVFormatContext *s, } #endif -#ifdef CONFIG_MPEGVIDEO_DEMUXER +#if CONFIG_MPEGVIDEO_DEMUXER #define SEQ_START_CODE 0x000001b3 #define GOP_START_CODE 0x000001b8 #define PICTURE_START_CODE 0x00000100 @@ -354,7 +354,7 @@ static int mpegvideo_probe(AVProbeData *p) } #endif -#ifdef CONFIG_M4V_DEMUXER +#if CONFIG_M4V_DEMUXER #define VISUAL_OBJECT_START_CODE 0x000001b5 #define VOP_START_CODE 0x000001b6 @@ -383,7 +383,7 @@ static int mpeg4video_probe(AVProbeData *probe_packet) } #endif -#ifdef CONFIG_H264_DEMUXER +#if CONFIG_H264_DEMUXER static int h264_probe(AVProbeData *p) { uint32_t code= -1; @@ -430,7 +430,7 @@ static int h264_probe(AVProbeData *p) } #endif -#ifdef CONFIG_H263_DEMUXER +#if CONFIG_H263_DEMUXER static int h263_probe(AVProbeData *p) { int code; @@ -445,7 +445,7 @@ static int h263_probe(AVProbeData *p) } #endif -#ifdef CONFIG_H261_DEMUXER +#if CONFIG_H261_DEMUXER static int h261_probe(AVProbeData *p) { int code; @@ -460,7 +460,7 @@ static int h261_probe(AVProbeData *p) } #endif -#ifdef CONFIG_DTS_DEMUXER +#if CONFIG_DTS_DEMUXER #define DCA_MARKER_14B_BE 0x1FFFE800 #define DCA_MARKER_14B_LE 0xFF1F00E8 #define DCA_MARKER_RAW_BE 0x7FFE8001 @@ -495,7 +495,7 @@ static int dts_probe(AVProbeData *p) } #endif -#ifdef CONFIG_DIRAC_DEMUXER +#if CONFIG_DIRAC_DEMUXER static int dirac_probe(AVProbeData *p) { if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D')) @@ -505,7 +505,7 @@ static int dirac_probe(AVProbeData *p) } #endif -#ifdef CONFIG_DNXHD_DEMUXER +#if CONFIG_DNXHD_DEMUXER static int dnxhd_probe(AVProbeData *p) { static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01}; @@ -516,7 +516,7 @@ static int dnxhd_probe(AVProbeData *p) } #endif -#if defined(CONFIG_AC3_DEMUXER) || defined(CONFIG_EAC3_DEMUXER) +#if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) { int max_frames, first_frames = 0, frames; @@ -555,21 +555,21 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) } #endif -#ifdef CONFIG_AC3_DEMUXER +#if CONFIG_AC3_DEMUXER static int ac3_probe(AVProbeData *p) { return ac3_eac3_probe(p, CODEC_ID_AC3); } #endif -#ifdef CONFIG_EAC3_DEMUXER +#if CONFIG_EAC3_DEMUXER static int eac3_probe(AVProbeData *p) { return ac3_eac3_probe(p, CODEC_ID_EAC3); } #endif -#ifdef CONFIG_FLAC_DEMUXER +#if CONFIG_FLAC_DEMUXER static int flac_probe(AVProbeData *p) { if(memcmp(p->buf, "fLaC", 4)) return 0; @@ -577,7 +577,7 @@ static int flac_probe(AVProbeData *p) } #endif -#ifdef CONFIG_AAC_DEMUXER +#if CONFIG_AAC_DEMUXER static int adts_aac_probe(AVProbeData *p) { int max_frames = 0, first_frames = 0; @@ -612,7 +612,7 @@ static int adts_aac_probe(AVProbeData *p) /* Note: Do not forget to add new entries to the Makefile as well. */ -#ifdef CONFIG_AAC_DEMUXER +#if CONFIG_AAC_DEMUXER AVInputFormat aac_demuxer = { "aac", NULL_IF_CONFIG_SMALL("ADTS AAC"), @@ -626,7 +626,7 @@ AVInputFormat aac_demuxer = { }; #endif -#ifdef CONFIG_AC3_DEMUXER +#if CONFIG_AC3_DEMUXER AVInputFormat ac3_demuxer = { "ac3", NULL_IF_CONFIG_SMALL("raw AC-3"), @@ -640,7 +640,7 @@ AVInputFormat ac3_demuxer = { }; #endif -#ifdef CONFIG_AC3_MUXER +#if CONFIG_AC3_MUXER AVOutputFormat ac3_muxer = { "ac3", NULL_IF_CONFIG_SMALL("raw AC-3"), @@ -655,7 +655,7 @@ AVOutputFormat ac3_muxer = { }; #endif -#ifdef CONFIG_DIRAC_DEMUXER +#if CONFIG_DIRAC_DEMUXER AVInputFormat dirac_demuxer = { "dirac", NULL_IF_CONFIG_SMALL("raw Dirac"), @@ -668,7 +668,7 @@ AVInputFormat dirac_demuxer = { }; #endif -#ifdef CONFIG_DIRAC_MUXER +#if CONFIG_DIRAC_MUXER AVOutputFormat dirac_muxer = { "dirac", NULL_IF_CONFIG_SMALL("raw Dirac"), @@ -683,7 +683,7 @@ AVOutputFormat dirac_muxer = { }; #endif -#ifdef CONFIG_DNXHD_DEMUXER +#if CONFIG_DNXHD_DEMUXER AVInputFormat dnxhd_demuxer = { "dnxhd", NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), @@ -696,7 +696,7 @@ AVInputFormat dnxhd_demuxer = { }; #endif -#ifdef CONFIG_DNXHD_MUXER +#if CONFIG_DNXHD_MUXER AVOutputFormat dnxhd_muxer = { "dnxhd", NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), @@ -711,7 +711,7 @@ AVOutputFormat dnxhd_muxer = { }; #endif -#ifdef CONFIG_DTS_DEMUXER +#if CONFIG_DTS_DEMUXER AVInputFormat dts_demuxer = { "dts", NULL_IF_CONFIG_SMALL("raw DTS"), @@ -725,7 +725,7 @@ AVInputFormat dts_demuxer = { }; #endif -#ifdef CONFIG_DTS_MUXER +#if CONFIG_DTS_MUXER AVOutputFormat dts_muxer = { "dts", NULL_IF_CONFIG_SMALL("raw DTS"), @@ -740,7 +740,7 @@ AVOutputFormat dts_muxer = { }; #endif -#ifdef CONFIG_EAC3_DEMUXER +#if CONFIG_EAC3_DEMUXER AVInputFormat eac3_demuxer = { "eac3", NULL_IF_CONFIG_SMALL("raw E-AC-3"), @@ -754,7 +754,7 @@ AVInputFormat eac3_demuxer = { }; #endif -#ifdef CONFIG_EAC3_MUXER +#if CONFIG_EAC3_MUXER AVOutputFormat eac3_muxer = { "eac3", NULL_IF_CONFIG_SMALL("raw E-AC-3"), @@ -769,7 +769,7 @@ AVOutputFormat eac3_muxer = { }; #endif -#ifdef CONFIG_FLAC_DEMUXER +#if CONFIG_FLAC_DEMUXER AVInputFormat flac_demuxer = { "flac", NULL_IF_CONFIG_SMALL("raw FLAC"), @@ -783,7 +783,7 @@ AVInputFormat flac_demuxer = { }; #endif -#ifdef CONFIG_FLAC_MUXER +#if CONFIG_FLAC_MUXER AVOutputFormat flac_muxer = { "flac", NULL_IF_CONFIG_SMALL("raw FLAC"), @@ -799,7 +799,7 @@ AVOutputFormat flac_muxer = { }; #endif -#ifdef CONFIG_GSM_DEMUXER +#if CONFIG_GSM_DEMUXER AVInputFormat gsm_demuxer = { "gsm", NULL_IF_CONFIG_SMALL("GSM"), @@ -813,7 +813,7 @@ AVInputFormat gsm_demuxer = { }; #endif -#ifdef CONFIG_H261_DEMUXER +#if CONFIG_H261_DEMUXER AVInputFormat h261_demuxer = { "h261", NULL_IF_CONFIG_SMALL("raw H.261"), @@ -827,7 +827,7 @@ AVInputFormat h261_demuxer = { }; #endif -#ifdef CONFIG_H261_MUXER +#if CONFIG_H261_MUXER AVOutputFormat h261_muxer = { "h261", NULL_IF_CONFIG_SMALL("raw H.261"), @@ -842,7 +842,7 @@ AVOutputFormat h261_muxer = { }; #endif -#ifdef CONFIG_H263_DEMUXER +#if CONFIG_H263_DEMUXER AVInputFormat h263_demuxer = { "h263", NULL_IF_CONFIG_SMALL("raw H.263"), @@ -856,7 +856,7 @@ AVInputFormat h263_demuxer = { }; #endif -#ifdef CONFIG_H263_MUXER +#if CONFIG_H263_MUXER AVOutputFormat h263_muxer = { "h263", NULL_IF_CONFIG_SMALL("raw H.263"), @@ -871,7 +871,7 @@ AVOutputFormat h263_muxer = { }; #endif -#ifdef CONFIG_H264_DEMUXER +#if CONFIG_H264_DEMUXER AVInputFormat h264_demuxer = { "h264", NULL_IF_CONFIG_SMALL("raw H.264 video format"), @@ -885,7 +885,7 @@ AVInputFormat h264_demuxer = { }; #endif -#ifdef CONFIG_H264_MUXER +#if CONFIG_H264_MUXER AVOutputFormat h264_muxer = { "h264", NULL_IF_CONFIG_SMALL("raw H.264 video format"), @@ -900,7 +900,7 @@ AVOutputFormat h264_muxer = { }; #endif -#ifdef CONFIG_INGENIENT_DEMUXER +#if CONFIG_INGENIENT_DEMUXER AVInputFormat ingenient_demuxer = { "ingenient", NULL_IF_CONFIG_SMALL("Ingenient MJPEG"), @@ -914,7 +914,7 @@ AVInputFormat ingenient_demuxer = { }; #endif -#ifdef CONFIG_M4V_DEMUXER +#if CONFIG_M4V_DEMUXER AVInputFormat m4v_demuxer = { "m4v", NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), @@ -928,7 +928,7 @@ AVInputFormat m4v_demuxer = { }; #endif -#ifdef CONFIG_M4V_MUXER +#if CONFIG_M4V_MUXER AVOutputFormat m4v_muxer = { "m4v", NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), @@ -943,7 +943,7 @@ AVOutputFormat m4v_muxer = { }; #endif -#ifdef CONFIG_MJPEG_DEMUXER +#if CONFIG_MJPEG_DEMUXER AVInputFormat mjpeg_demuxer = { "mjpeg", NULL_IF_CONFIG_SMALL("MJPEG video"), @@ -957,7 +957,7 @@ AVInputFormat mjpeg_demuxer = { }; #endif -#ifdef CONFIG_MJPEG_MUXER +#if CONFIG_MJPEG_MUXER AVOutputFormat mjpeg_muxer = { "mjpeg", NULL_IF_CONFIG_SMALL("MJPEG video"), @@ -972,7 +972,7 @@ AVOutputFormat mjpeg_muxer = { }; #endif -#ifdef CONFIG_MLP_DEMUXER +#if CONFIG_MLP_DEMUXER AVInputFormat mlp_demuxer = { "mlp", NULL_IF_CONFIG_SMALL("raw MLP"), @@ -986,7 +986,7 @@ AVInputFormat mlp_demuxer = { }; #endif -#ifdef CONFIG_MPEG1VIDEO_MUXER +#if CONFIG_MPEG1VIDEO_MUXER AVOutputFormat mpeg1video_muxer = { "mpeg1video", NULL_IF_CONFIG_SMALL("MPEG video"), @@ -1001,7 +1001,7 @@ AVOutputFormat mpeg1video_muxer = { }; #endif -#ifdef CONFIG_MPEG2VIDEO_MUXER +#if CONFIG_MPEG2VIDEO_MUXER AVOutputFormat mpeg2video_muxer = { "mpeg2video", NULL_IF_CONFIG_SMALL("MPEG-2 video"), @@ -1016,7 +1016,7 @@ AVOutputFormat mpeg2video_muxer = { }; #endif -#ifdef CONFIG_MPEGVIDEO_DEMUXER +#if CONFIG_MPEGVIDEO_DEMUXER AVInputFormat mpegvideo_demuxer = { "mpegvideo", NULL_IF_CONFIG_SMALL("MPEG video"), @@ -1029,7 +1029,7 @@ AVInputFormat mpegvideo_demuxer = { }; #endif -#ifdef CONFIG_NULL_MUXER +#if CONFIG_NULL_MUXER AVOutputFormat null_muxer = { "null", NULL_IF_CONFIG_SMALL("null video format"), @@ -1048,7 +1048,7 @@ AVOutputFormat null_muxer = { }; #endif -#ifdef CONFIG_RAWVIDEO_DEMUXER +#if CONFIG_RAWVIDEO_DEMUXER AVInputFormat rawvideo_demuxer = { "rawvideo", NULL_IF_CONFIG_SMALL("raw video format"), @@ -1062,7 +1062,7 @@ AVInputFormat rawvideo_demuxer = { }; #endif -#ifdef CONFIG_RAWVIDEO_MUXER +#if CONFIG_RAWVIDEO_MUXER AVOutputFormat rawvideo_muxer = { "rawvideo", NULL_IF_CONFIG_SMALL("raw video format"), @@ -1077,7 +1077,7 @@ AVOutputFormat rawvideo_muxer = { }; #endif -#ifdef CONFIG_ROQ_MUXER +#if CONFIG_ROQ_MUXER AVOutputFormat roq_muxer = { "RoQ", @@ -1092,7 +1092,7 @@ AVOutputFormat roq_muxer = }; #endif -#ifdef CONFIG_SHORTEN_DEMUXER +#if CONFIG_SHORTEN_DEMUXER AVInputFormat shorten_demuxer = { "shn", NULL_IF_CONFIG_SMALL("raw Shorten"), @@ -1106,7 +1106,7 @@ AVInputFormat shorten_demuxer = { }; #endif -#ifdef CONFIG_VC1_DEMUXER +#if CONFIG_VC1_DEMUXER AVInputFormat vc1_demuxer = { "vc1", NULL_IF_CONFIG_SMALL("raw VC-1"), @@ -1151,13 +1151,13 @@ AVOutputFormat pcm_ ## name ## _muxer = {\ }; -#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS) +#if !CONFIG_MUXERS && CONFIG_DEMUXERS #define PCMDEF(name, long_name, ext, codec) \ PCMINPUTDEF(name, long_name, ext, codec) -#elif defined(CONFIG_MUXERS) && !defined(CONFIG_DEMUXERS) +#elif CONFIG_MUXERS && !CONFIG_DEMUXERS #define PCMDEF(name, long_name, ext, codec) \ PCMOUTPUTDEF(name, long_name, ext, codec) -#elif defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS) +#elif CONFIG_MUXERS && CONFIG_DEMUXERS #define PCMDEF(name, long_name, ext, codec) \ PCMINPUTDEF(name, long_name, ext, codec)\ PCMOUTPUTDEF(name, long_name, ext, codec) diff --git a/libavformat/riff.c b/libavformat/riff.c index ed7d9a5f22..270aecc6b6 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -248,7 +248,7 @@ const AVCodecTag codec_wav_tags[] = { { 0, 0 }, }; -#ifdef CONFIG_MUXERS +#if CONFIG_MUXERS int64_t start_tag(ByteIOContext *pb, const char *tag) { put_tag(pb, tag); @@ -379,7 +379,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta } #endif //CONFIG_MUXERS -#ifdef CONFIG_DEMUXERS +#if CONFIG_DEMUXERS /* We could be given one of the three possible structures here: * WAVEFORMAT, PCMWAVEFORMAT or WAVEFORMATEX. Each structure * is an expansion of the previous one with the fields added diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index b78c759b02..1933ab06dc 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -32,7 +32,7 @@ #include "network.h" #include "os_support.h" #include <fcntl.h> -#ifdef HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include <sys/select.h> #endif diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 82e025f7d7..46a715909c 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -27,7 +27,7 @@ #include "avformat.h" #include <sys/time.h> -#ifdef HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include <strings.h> @@ -1502,7 +1502,7 @@ static int rtsp_read_close(AVFormatContext *s) return 0; } -#ifdef CONFIG_RTSP_DEMUXER +#if CONFIG_RTSP_DEMUXER AVInputFormat rtsp_demuxer = { "rtsp", NULL_IF_CONFIG_SMALL("RTSP input format"), @@ -1595,7 +1595,7 @@ static int sdp_read_close(AVFormatContext *s) return 0; } -#ifdef CONFIG_SDP_DEMUXER +#if CONFIG_SDP_DEMUXER AVInputFormat sdp_demuxer = { "sdp", NULL_IF_CONFIG_SMALL("SDP"), @@ -1607,7 +1607,7 @@ AVInputFormat sdp_demuxer = { }; #endif -#ifdef CONFIG_REDIR_DEMUXER +#if CONFIG_REDIR_DEMUXER /* dummy redirector format (used directly in av_open_input_file now) */ static int redir_probe(AVProbeData *pd) { diff --git a/libavformat/sdp.c b/libavformat/sdp.c index d22f516c55..09541e3672 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -25,7 +25,7 @@ #include "avc.h" #include "rtp.h" -#ifdef CONFIG_RTP_MUXER +#if CONFIG_RTP_MUXER #define MAX_EXTRADATA_SIZE ((INT_MAX - 10) / 2) struct sdp_session_level { diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index 52e3c7270f..1431daf589 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -503,7 +503,7 @@ static int swf_write_trailer(AVFormatContext *s) return 0; } -#ifdef CONFIG_SWF_MUXER +#if CONFIG_SWF_MUXER AVOutputFormat swf_muxer = { "swf", NULL_IF_CONFIG_SMALL("Flash format"), @@ -517,7 +517,7 @@ AVOutputFormat swf_muxer = { swf_write_trailer, }; #endif -#ifdef CONFIG_AVM2_MUXER +#if CONFIG_AVM2_MUXER AVOutputFormat avm2_muxer = { "avm2", NULL_IF_CONFIG_SMALL("Flash 9 (AVM2) format"), diff --git a/libavformat/tcp.c b/libavformat/tcp.c index 05844517e5..d7eede61d2 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -22,7 +22,7 @@ #include <unistd.h> #include "network.h" #include "os_support.h" -#ifdef HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include <sys/time.h> diff --git a/libavformat/udp.c b/libavformat/udp.c index 1101ffcf9a..f433e075af 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -29,7 +29,7 @@ #include <unistd.h> #include "network.h" #include "os_support.h" -#ifdef HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include <sys/time.h> @@ -52,7 +52,7 @@ typedef struct { int is_multicast; int local_port; int reuse_socket; -#ifndef CONFIG_IPV6 +#if !CONFIG_IPV6 struct sockaddr_in dest_addr; #else struct sockaddr_storage dest_addr; @@ -72,7 +72,7 @@ static int udp_set_multicast_ttl(int sockfd, int mcastTTL, struct sockaddr *addr } } #endif -#ifdef CONFIG_IPV6 +#if CONFIG_IPV6 if (addr->sa_family == AF_INET6) { if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &mcastTTL, sizeof(mcastTTL)) < 0) { av_log(NULL, AV_LOG_ERROR, "setsockopt(IPV6_MULTICAST_HOPS): %s\n", strerror(errno)); @@ -96,7 +96,7 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr) { } } #endif -#ifdef CONFIG_IPV6 +#if CONFIG_IPV6 if (addr->sa_family == AF_INET6) { struct ipv6_mreq mreq6; @@ -124,7 +124,7 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr) { } } #endif -#ifdef CONFIG_IPV6 +#if CONFIG_IPV6 if (addr->sa_family == AF_INET6) { struct ipv6_mreq mreq6; @@ -139,7 +139,7 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr) { return 0; } -#ifdef CONFIG_IPV6 +#if CONFIG_IPV6 static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, int type, int family, int flags) { struct addrinfo hints, *res = 0; int error; @@ -342,7 +342,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) int is_output; const char *p; char buf[256]; -#ifndef CONFIG_IPV6 +#if !CONFIG_IPV6 struct sockaddr_in my_addr; #else struct sockaddr_storage my_addr; diff --git a/libavformat/utils.c b/libavformat/utils.c index 707e47edb9..a675048744 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -160,7 +160,7 @@ AVOutputFormat *guess_format(const char *short_name, const char *filename, int score_max, score; /* specific test for image sequences */ -#ifdef CONFIG_IMAGE2_MUXER +#if CONFIG_IMAGE2_MUXER if (!short_name && filename && av_filename_number_test(filename) && av_guess_image2_codec(filename) != CODEC_ID_NONE) { @@ -214,7 +214,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, if(type == CODEC_TYPE_VIDEO){ enum CodecID codec_id= CODEC_ID_NONE; -#ifdef CONFIG_IMAGE2_MUXER +#if CONFIG_IMAGE2_MUXER if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){ codec_id= av_guess_image2_codec(filename); } diff --git a/libavformat/wav.c b/libavformat/wav.c index 01923d5aad..7aec532fe9 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -30,7 +30,7 @@ typedef struct { int last_duration; } WAVContext; -#ifdef CONFIG_WAV_MUXER +#if CONFIG_WAV_MUXER static int wav_write_header(AVFormatContext *s) { WAVContext *wav = s->priv_data; @@ -256,7 +256,7 @@ static int wav_read_seek(AVFormatContext *s, return pcm_read_seek(s, stream_index, timestamp, flags); } -#ifdef CONFIG_WAV_DEMUXER +#if CONFIG_WAV_DEMUXER AVInputFormat wav_demuxer = { "wav", NULL_IF_CONFIG_SMALL("WAV format"), @@ -270,7 +270,7 @@ AVInputFormat wav_demuxer = { .codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0}, }; #endif -#ifdef CONFIG_WAV_MUXER +#if CONFIG_WAV_MUXER AVOutputFormat wav_muxer = { "wav", NULL_IF_CONFIG_SMALL("WAV format"), diff --git a/libavformat/westwood.c b/libavformat/westwood.c index 1c769466de..753daca571 100644 --- a/libavformat/westwood.c +++ b/libavformat/westwood.c @@ -371,7 +371,7 @@ static int wsvqa_read_packet(AVFormatContext *s, return ret; } -#ifdef CONFIG_WSAUD_DEMUXER +#if CONFIG_WSAUD_DEMUXER AVInputFormat wsaud_demuxer = { "wsaud", NULL_IF_CONFIG_SMALL("Westwood Studios audio format"), @@ -381,7 +381,7 @@ AVInputFormat wsaud_demuxer = { wsaud_read_packet, }; #endif -#ifdef CONFIG_WSVQA_DEMUXER +#if CONFIG_WSVQA_DEMUXER AVInputFormat wsvqa_demuxer = { "wsvqa", NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"), diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index bc6c781bcf..6a5e8ee09d 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -29,7 +29,7 @@ struct frame_attributes { int top_field_first; }; -#ifdef CONFIG_YUV4MPEGPIPE_MUXER +#if CONFIG_YUV4MPEGPIPE_MUXER static int yuv4_generate_header(AVFormatContext *s, char* buf) { AVStream *st; @@ -382,7 +382,7 @@ static int yuv4_probe(AVProbeData *pd) return 0; } -#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER +#if CONFIG_YUV4MPEGPIPE_DEMUXER AVInputFormat yuv4mpegpipe_demuxer = { "yuv4mpegpipe", NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"), |