From: Derek Buitenhuis Date: Thu, 12 May 2016 13:04:02 +0000 (+0100) Subject: Merge commit '06edef3d5e072ef3c4face9ce946d2d9c36cc477' X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9f8a942d6ac9c953664341d5bc37b41c1fbab48b;p=ffmpeg Merge commit '06edef3d5e072ef3c4face9ce946d2d9c36cc477' * commit '06edef3d5e072ef3c4face9ce946d2d9c36cc477': Generate the lists of enabled protocols/bsfs from configure. Merged-by: Derek Buitenhuis --- 9f8a942d6ac9c953664341d5bc37b41c1fbab48b diff --cc .gitignore index f0442e28e70,0d8f1fb8f82..e8ea178e549 --- a/.gitignore +++ b/.gitignore @@@ -39,33 -32,20 +39,35 @@@ /doc/avoptions_codec.texi /doc/avoptions_format.texi /doc/doxy/html/ -/doc/examples/avcodec +/doc/examples/avio_dir_cmd +/doc/examples/avio_reading +/doc/examples/decoding_encoding +/doc/examples/demuxing_decoding +/doc/examples/extract_mvs /doc/examples/filter_audio +/doc/examples/filtering_audio +/doc/examples/filtering_video /doc/examples/metadata -/doc/examples/output +/doc/examples/muxing +/doc/examples/pc-uninstalled +/doc/examples/remuxing +/doc/examples/resampling_audio +/doc/examples/scaling_video /doc/examples/transcode_aac +/doc/examples/transcoding +/doc/fate.txt /doc/print_options /lcov/ + /libavformat/protocol_list.c /libavcodec/*_tablegen /libavcodec/*_tables.c /libavcodec/*_tables.h + /libavcodec/bsf_list.c /libavutil/avconfig.h +/libavutil/ffversion.h +/src /tests/audiogen +/tests/audiomatch /tests/base64 /tests/checkasm/checkasm /tests/data/ diff --cc Makefile index d23473c5197,1d7bc4a470e..0ff4a876aea --- a/Makefile +++ b/Makefile @@@ -183,16 -217,13 +183,16 @@@ clean: distclean:: $(RM) $(DISTCLEANSUFFIXES) - $(RM) config.* .config libavutil/avconfig.h .version avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h - $(RM) config.* .config libavutil/avconfig.h .version avversion.h \ - libavcodec/bsf_list.c libavformat/protocol_list.c ++ $(RM) config.* .config libavutil/avconfig.h .version avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h libavcodec/bsf_list.c libavformat/protocol_list.c +ifeq ($(SRC_LINK),src) + $(RM) src +endif + $(RM) -rf doc/examples/pc-uninstalled config: - $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) + $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION) -check: all alltools checkheaders examples testprogs fate +check: all alltools examples testprogs fate include $(SRC_PATH)/tests/Makefile diff --cc configure index 9a986ac8f3a,117e2864509..2dede36dba6 --- a/configure +++ b/configure @@@ -6637,11 -5308,25 +6637,28 @@@ echo "#endif /* AVUTIL_AVCONFIG_H */" > cp_if_changed $TMPH libavutil/avconfig.h -test -n "$WARNINGS" && printf "\n$WARNINGS" +if test -n "$WARNINGS"; then + printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color" + enabled fatal_warnings && exit 1 +fi + # generate the lists of enabled components + print_enabled_components(){ + file=$1 + struct_name=$2 + name=$3 + shift 3 + echo "static const $struct_name *$name[] = {" > $TMPH + for c in $*; do + enabled $c && printf " &ff_%s,\n" $c >> $TMPH + done + echo " NULL };" >> $TMPH + cp_if_changed $TMPH $file + } + + print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST + print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST + # build pkg-config files lib_version(){ diff --cc libavcodec/bitstream_filters.c index 51f3cd97999,3b4026cbff5..840bb43e4dd --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@@ -33,65 -32,12 +33,15 @@@ extern const AVBitStreamFilter ff_hevc_ extern const AVBitStreamFilter ff_imx_dump_header_bsf; extern const AVBitStreamFilter ff_mjpeg2jpeg_bsf; extern const AVBitStreamFilter ff_mjpega_dump_header_bsf; +extern const AVBitStreamFilter ff_mp3_header_decompress_bsf; +extern const AVBitStreamFilter ff_mpeg4_unpack_bframes_bsf; extern const AVBitStreamFilter ff_mov2textsub_bsf; -extern const AVBitStreamFilter ff_text2movsub_bsf; extern const AVBitStreamFilter ff_noise_bsf; extern const AVBitStreamFilter ff_remove_extradata_bsf; +extern const AVBitStreamFilter ff_text2movsub_bsf; +extern const AVBitStreamFilter ff_vp9_superframe_bsf; - static const AVBitStreamFilter *bitstream_filters[] = { - #if CONFIG_AAC_ADTSTOASC_BSF - &ff_aac_adtstoasc_bsf, - #endif - #if CONFIG_CHOMP_BSF - &ff_chomp_bsf, - #endif - #if CONFIG_DUMP_EXTRADATA_BSF - &ff_dump_extradata_bsf, - #endif - #if CONFIG_DCA_CORE_BSF - &ff_dca_core_bsf, - #endif - #if CONFIG_H264_MP4TOANNEXB_BSF - &ff_h264_mp4toannexb_bsf, - #endif - #if CONFIG_HEVC_MP4TOANNEXB_BSF - &ff_hevc_mp4toannexb_bsf, - #endif - #if CONFIG_IMX_DUMP_HEADER_BSF - &ff_imx_dump_header_bsf, - #endif - #if CONFIG_MJPEG2JPEG_BSF - &ff_mjpeg2jpeg_bsf, - #endif - #if CONFIG_MJPEGA_DUMP_HEADER_BSF - &ff_mjpega_dump_header_bsf, - #endif - #if CONFIG_MP3_HEADER_DECOMPRESS_BSF - &ff_mp3_header_decompress_bsf, - #endif - #if CONFIG_MPEG4_UNPACK_BFRAMES_BSF - &ff_mpeg4_unpack_bframes_bsf, - #endif - #if CONFIG_MOV2TEXTSUB_BSF - &ff_mov2textsub_bsf, - #endif - #if CONFIG_NOISE_BSF - &ff_noise_bsf, - #endif - #if CONFIG_REMOVE_EXTRADATA_BSF - &ff_remove_extradata_bsf, - #endif - #if CONFIG_TEXT2MOVSUB_BSF - &ff_text2movsub_bsf, - #endif - #if CONFIG_VP9_SUPERFRAME_BSF - &ff_vp9_superframe_bsf, - #endif - NULL, - }; + #include "libavcodec/bsf_list.c" const AVBitStreamFilter *av_bsf_next(void **opaque) { diff --cc libavformat/protocols.c index 77cd3a4a5c7,d25454021ff..124010ccedb --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@@ -66,149 -57,8 +66,10 @@@ extern const URLProtocol ff_librtmpe_pr extern const URLProtocol ff_librtmps_protocol; extern const URLProtocol ff_librtmpt_protocol; extern const URLProtocol ff_librtmpte_protocol; +extern const URLProtocol ff_libssh_protocol; +extern const URLProtocol ff_libsmbclient_protocol; - static const URLProtocol *url_protocols[] = { - #if CONFIG_ASYNC_PROTOCOL - &ff_async_protocol, - #endif - #if CONFIG_BLURAY_PROTOCOL - &ff_bluray_protocol, - #endif - #if CONFIG_CACHE_PROTOCOL - &ff_cache_protocol, - #endif - #if CONFIG_CONCAT_PROTOCOL - &ff_concat_protocol, - #endif - #if CONFIG_CRYPTO_PROTOCOL - &ff_crypto_protocol, - #endif - #if CONFIG_DATA_PROTOCOL - &ff_data_protocol, - #endif - #if CONFIG_FFRTMPCRYPT_PROTOCOL - &ff_ffrtmpcrypt_protocol, - #endif - #if CONFIG_FFRTMPHTTP_PROTOCOL - &ff_ffrtmphttp_protocol, - #endif - #if CONFIG_FILE_PROTOCOL - &ff_file_protocol, - #endif - #if CONFIG_FTP_PROTOCOL - &ff_ftp_protocol, - #endif - #if CONFIG_GOPHER_PROTOCOL - &ff_gopher_protocol, - #endif - #if CONFIG_HLS_PROTOCOL - &ff_hls_protocol, - #endif - #if CONFIG_HTTP_PROTOCOL - &ff_http_protocol, - #endif - #if CONFIG_HTTPPROXY_PROTOCOL - &ff_httpproxy_protocol, - #endif - #if CONFIG_HTTPS_PROTOCOL - &ff_https_protocol, - #endif - #if CONFIG_ICECAST_PROTOCOL - &ff_icecast_protocol, - #endif - #if CONFIG_MMSH_PROTOCOL - &ff_mmsh_protocol, - #endif - #if CONFIG_MMST_PROTOCOL - &ff_mmst_protocol, - #endif - #if CONFIG_MD5_PROTOCOL - &ff_md5_protocol, - #endif - #if CONFIG_PIPE_PROTOCOL - &ff_pipe_protocol, - #endif - #if CONFIG_RTMP_PROTOCOL - &ff_rtmp_protocol, - #endif - #if CONFIG_RTMPE_PROTOCOL - &ff_rtmpe_protocol, - #endif - #if CONFIG_RTMPS_PROTOCOL - &ff_rtmps_protocol, - #endif - #if CONFIG_RTMPT_PROTOCOL - &ff_rtmpt_protocol, - #endif - #if CONFIG_RTMPTE_PROTOCOL - &ff_rtmpte_protocol, - #endif - #if CONFIG_RTMPTS_PROTOCOL - &ff_rtmpts_protocol, - #endif - #if CONFIG_RTP_PROTOCOL - &ff_rtp_protocol, - #endif - #if CONFIG_SCTP_PROTOCOL - &ff_sctp_protocol, - #endif - #if CONFIG_SRTP_PROTOCOL - &ff_srtp_protocol, - #endif - #if CONFIG_SUBFILE_PROTOCOL - &ff_subfile_protocol, - #endif - #if CONFIG_TCP_PROTOCOL - &ff_tcp_protocol, - #endif - #if CONFIG_TLS_GNUTLS_PROTOCOL - &ff_tls_gnutls_protocol, - #endif - #if CONFIG_TLS_SCHANNEL_PROTOCOL - &ff_tls_schannel_protocol, - #endif - #if CONFIG_TLS_SECURETRANSPORT_PROTOCOL - &ff_tls_securetransport_protocol, - #endif - #if CONFIG_TLS_OPENSSL_PROTOCOL - &ff_tls_openssl_protocol, - #endif - #if CONFIG_UDP_PROTOCOL - &ff_udp_protocol, - #endif - #if CONFIG_UDPLITE_PROTOCOL - &ff_udplite_protocol, - #endif - #if CONFIG_UNIX_PROTOCOL - &ff_unix_protocol, - #endif - - /* external libraries */ - #if CONFIG_LIBRTMP_PROTOCOL - &ff_librtmp_protocol, - #endif - #if CONFIG_LIBRTMPE_PROTOCOL - &ff_librtmpe_protocol, - #endif - #if CONFIG_LIBRTMPS_PROTOCOL - &ff_librtmps_protocol, - #endif - #if CONFIG_LIBRTMPT_PROTOCOL - &ff_librtmpt_protocol, - #endif - #if CONFIG_LIBRTMPTE_PROTOCOL - &ff_librtmpte_protocol, - #endif - #if CONFIG_LIBSSH_PROTOCOL - &ff_libssh_protocol, - #endif - #if CONFIG_LIBSMBCLIENT_PROTOCOL - &ff_libsmbclient_protocol, - #endif - NULL, - }; + #include "libavformat/protocol_list.c" const AVClass *ff_urlcontext_child_class_next(const AVClass *prev) {