From bf80725352d274aed2fdd8f2d457788b3c2e5e7e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 7 Apr 2020 16:49:28 +0200 Subject: lavc: rename bsf.h to bsf_internal.h This will allow adding a public header named bsf.h --- libavcodec/aac_adtstoasc_bsf.c | 2 +- libavcodec/av1_frame_merge_bsf.c | 2 +- libavcodec/av1_frame_split_bsf.c | 2 +- libavcodec/av1_metadata_bsf.c | 2 +- libavcodec/bitstream_filters.c | 2 +- libavcodec/bsf.c | 2 +- libavcodec/bsf.h | 44 ---------------------------------- libavcodec/bsf_internal.h | 44 ++++++++++++++++++++++++++++++++++ libavcodec/chomp_bsf.c | 2 +- libavcodec/dca_core_bsf.c | 2 +- libavcodec/dump_extradata_bsf.c | 2 +- libavcodec/eac3_core_bsf.c | 2 +- libavcodec/extract_extradata_bsf.c | 2 +- libavcodec/filter_units_bsf.c | 2 +- libavcodec/h264_metadata_bsf.c | 2 +- libavcodec/h264_mp4toannexb_bsf.c | 2 +- libavcodec/h264_redundant_pps_bsf.c | 2 +- libavcodec/h265_metadata_bsf.c | 2 +- libavcodec/hapqa_extract_bsf.c | 2 +- libavcodec/hevc_mp4toannexb_bsf.c | 2 +- libavcodec/imx_dump_header_bsf.c | 2 +- libavcodec/mjpeg2jpeg_bsf.c | 2 +- libavcodec/mjpega_dump_header_bsf.c | 2 +- libavcodec/movsub_bsf.c | 2 +- libavcodec/mp3_header_decompress_bsf.c | 2 +- libavcodec/mpeg2_metadata_bsf.c | 2 +- libavcodec/mpeg4_unpack_bframes_bsf.c | 2 +- libavcodec/noise_bsf.c | 2 +- libavcodec/null_bsf.c | 2 +- libavcodec/opus_metadata_bsf.c | 2 +- libavcodec/pcm_rechunk_bsf.c | 2 +- libavcodec/prores_metadata_bsf.c | 2 +- libavcodec/remove_extradata_bsf.c | 2 +- libavcodec/trace_headers_bsf.c | 2 +- libavcodec/truehd_core_bsf.c | 2 +- libavcodec/vp9_metadata_bsf.c | 2 +- libavcodec/vp9_raw_reorder_bsf.c | 2 +- libavcodec/vp9_superframe_bsf.c | 2 +- libavcodec/vp9_superframe_split_bsf.c | 2 +- tools/target_bsf_fuzzer.c | 2 +- 40 files changed, 82 insertions(+), 82 deletions(-) delete mode 100644 libavcodec/bsf.h create mode 100644 libavcodec/bsf_internal.h diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c index e378296950..1d0117fecb 100644 --- a/libavcodec/aac_adtstoasc_bsf.c +++ b/libavcodec/aac_adtstoasc_bsf.c @@ -22,7 +22,7 @@ #include "adts_header.h" #include "adts_parser.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "put_bits.h" #include "get_bits.h" #include "mpeg4audio.h" diff --git a/libavcodec/av1_frame_merge_bsf.c b/libavcodec/av1_frame_merge_bsf.c index 49397111fc..c67b86c8d4 100644 --- a/libavcodec/av1_frame_merge_bsf.c +++ b/libavcodec/av1_frame_merge_bsf.c @@ -19,7 +19,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_av1.h" diff --git a/libavcodec/av1_frame_split_bsf.c b/libavcodec/av1_frame_split_bsf.c index a386c6edc1..fc9eac0324 100644 --- a/libavcodec/av1_frame_split_bsf.c +++ b/libavcodec/av1_frame_split_bsf.c @@ -33,7 +33,7 @@ #include "libavutil/avassert.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_av1.h" diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c index e5dde6754f..21ad3ac2d1 100644 --- a/libavcodec/av1_metadata_bsf.c +++ b/libavcodec/av1_metadata_bsf.c @@ -19,7 +19,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_av1.h" diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c index 359961fedd..a7aa5dca65 100644 --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@ -22,7 +22,7 @@ #include "libavutil/log.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" extern const AVBitStreamFilter ff_aac_adtstoasc_bsf; extern const AVBitStreamFilter ff_av1_frame_merge_bsf; diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 85b63a5c9a..42c20df296 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -26,7 +26,7 @@ #include "libavutil/bprint.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #define IS_EMPTY(pkt) (!(pkt)->data && !(pkt)->side_data_elems) diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h deleted file mode 100644 index d04f1d3068..0000000000 --- a/libavcodec/bsf.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_BSF_H -#define AVCODEC_BSF_H - -#include "avcodec.h" - -/** - * Called by the bitstream filters to get the next packet for filtering. - * The filter is responsible for either freeing the packet or passing it to the - * caller. - */ -int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt); - -/** - * Called by bitstream filters to get packet for filtering. - * The reference to packet is moved to provided packet structure. - * - * @param ctx pointer to AVBSFContext of filter - * @param pkt pointer to packet to move reference to - * - * @return 0 on success, negative AVERROR in case of failure - */ -int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt); - -const AVClass *ff_bsf_child_class_next(const AVClass *prev); - -#endif /* AVCODEC_BSF_H */ diff --git a/libavcodec/bsf_internal.h b/libavcodec/bsf_internal.h new file mode 100644 index 0000000000..d22c1b4f83 --- /dev/null +++ b/libavcodec/bsf_internal.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BSF_INTERNAL_H +#define AVCODEC_BSF_INTERNAL_H + +#include "avcodec.h" + +/** + * Called by the bitstream filters to get the next packet for filtering. + * The filter is responsible for either freeing the packet or passing it to the + * caller. + */ +int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt); + +/** + * Called by bitstream filters to get packet for filtering. + * The reference to packet is moved to provided packet structure. + * + * @param ctx pointer to AVBSFContext of filter + * @param pkt pointer to packet to move reference to + * + * @return 0 on success, negative AVERROR in case of failure + */ +int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt); + +const AVClass *ff_bsf_child_class_next(const AVClass *prev); + +#endif /* AVCODEC_BSF_INTERNAL_H */ diff --git a/libavcodec/chomp_bsf.c b/libavcodec/chomp_bsf.c index 9b06ace0a4..19d073322c 100644 --- a/libavcodec/chomp_bsf.c +++ b/libavcodec/chomp_bsf.c @@ -20,7 +20,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" static int chomp_filter(AVBSFContext *ctx, AVPacket *pkt) { diff --git a/libavcodec/dca_core_bsf.c b/libavcodec/dca_core_bsf.c index f0c5039e30..0461d02244 100644 --- a/libavcodec/dca_core_bsf.c +++ b/libavcodec/dca_core_bsf.c @@ -19,7 +19,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "dca_syncwords.h" diff --git a/libavcodec/dump_extradata_bsf.c b/libavcodec/dump_extradata_bsf.c index 218853d25e..d456a35598 100644 --- a/libavcodec/dump_extradata_bsf.c +++ b/libavcodec/dump_extradata_bsf.c @@ -21,7 +21,7 @@ #include #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" diff --git a/libavcodec/eac3_core_bsf.c b/libavcodec/eac3_core_bsf.c index 3e4dc2e2a2..c584d69227 100644 --- a/libavcodec/eac3_core_bsf.c +++ b/libavcodec/eac3_core_bsf.c @@ -19,7 +19,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "get_bits.h" #include "ac3_parser_internal.h" diff --git a/libavcodec/extract_extradata_bsf.c b/libavcodec/extract_extradata_bsf.c index 46b76dfbef..d7ffa1bff2 100644 --- a/libavcodec/extract_extradata_bsf.c +++ b/libavcodec/extract_extradata_bsf.c @@ -26,7 +26,7 @@ #include "avcodec.h" #include "av1.h" #include "av1_parse.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "h2645_parse.h" #include "h264.h" diff --git a/libavcodec/filter_units_bsf.c b/libavcodec/filter_units_bsf.c index 380f23e5a7..7c3819c7b3 100644 --- a/libavcodec/filter_units_bsf.c +++ b/libavcodec/filter_units_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 451eaa0b67..cbe36687a0 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_h264.h" #include "h264.h" diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 0150f97a1a..52fc9b90cf 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -26,7 +26,7 @@ #include "libavutil/mem.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "h264.h" diff --git a/libavcodec/h264_redundant_pps_bsf.c b/libavcodec/h264_redundant_pps_bsf.c index 8405738c4b..34885d320a 100644 --- a/libavcodec/h264_redundant_pps_bsf.c +++ b/libavcodec/h264_redundant_pps_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/mem.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_h264.h" #include "h264.h" diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c index 0fe350e053..d5179bd489 100644 --- a/libavcodec/h265_metadata_bsf.c +++ b/libavcodec/h265_metadata_bsf.c @@ -19,7 +19,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_h265.h" #include "hevc.h" diff --git a/libavcodec/hapqa_extract_bsf.c b/libavcodec/hapqa_extract_bsf.c index 5c22184813..9fdcbe2886 100644 --- a/libavcodec/hapqa_extract_bsf.c +++ b/libavcodec/hapqa_extract_bsf.c @@ -26,7 +26,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "hap.h" diff --git a/libavcodec/hevc_mp4toannexb_bsf.c b/libavcodec/hevc_mp4toannexb_bsf.c index 30f733d775..b63d58c551 100644 --- a/libavcodec/hevc_mp4toannexb_bsf.c +++ b/libavcodec/hevc_mp4toannexb_bsf.c @@ -25,7 +25,7 @@ #include "libavutil/mem.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "hevc.h" diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c index 9a9de05f05..6f3d7e52b0 100644 --- a/libavcodec/imx_dump_header_bsf.c +++ b/libavcodec/imx_dump_header_bsf.c @@ -26,7 +26,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c index 76605b2805..b18a6bf79d 100644 --- a/libavcodec/mjpeg2jpeg_bsf.c +++ b/libavcodec/mjpeg2jpeg_bsf.c @@ -30,7 +30,7 @@ #include "libavutil/intreadwrite.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "jpegtables.h" #include "mjpeg.h" diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c index ca5fb3a377..e8a440a69f 100644 --- a/libavcodec/mjpega_dump_header_bsf.c +++ b/libavcodec/mjpega_dump_header_bsf.c @@ -26,7 +26,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "mjpeg.h" diff --git a/libavcodec/movsub_bsf.c b/libavcodec/movsub_bsf.c index cd48aa7bb8..bfc06a70f8 100644 --- a/libavcodec/movsub_bsf.c +++ b/libavcodec/movsub_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" static int text2movsub(AVBSFContext *ctx, AVPacket *out) { diff --git a/libavcodec/mp3_header_decompress_bsf.c b/libavcodec/mp3_header_decompress_bsf.c index ab3d420300..158d96853e 100644 --- a/libavcodec/mp3_header_decompress_bsf.c +++ b/libavcodec/mp3_header_decompress_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "mpegaudiodecheader.h" #include "mpegaudiodata.h" diff --git a/libavcodec/mpeg2_metadata_bsf.c b/libavcodec/mpeg2_metadata_bsf.c index 3f371a028d..8c6dad9625 100644 --- a/libavcodec/mpeg2_metadata_bsf.c +++ b/libavcodec/mpeg2_metadata_bsf.c @@ -20,7 +20,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_mpeg2.h" #include "mpeg12.h" diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c index 1500d2135d..6934cce73a 100644 --- a/libavcodec/mpeg4_unpack_bframes_bsf.c +++ b/libavcodec/mpeg4_unpack_bframes_bsf.c @@ -20,7 +20,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "internal.h" #include "mpeg4video.h" diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c index b72429a2d4..b5f58f1230 100644 --- a/libavcodec/noise_bsf.c +++ b/libavcodec/noise_bsf.c @@ -21,7 +21,7 @@ #include #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" diff --git a/libavcodec/null_bsf.c b/libavcodec/null_bsf.c index 37f4640c87..22d341a9ca 100644 --- a/libavcodec/null_bsf.c +++ b/libavcodec/null_bsf.c @@ -22,7 +22,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" const AVBitStreamFilter ff_null_bsf = { .name = "null", diff --git a/libavcodec/opus_metadata_bsf.c b/libavcodec/opus_metadata_bsf.c index d22db54f30..723e31c243 100644 --- a/libavcodec/opus_metadata_bsf.c +++ b/libavcodec/opus_metadata_bsf.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "bsf.h" +#include "bsf_internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/opt.h" diff --git a/libavcodec/pcm_rechunk_bsf.c b/libavcodec/pcm_rechunk_bsf.c index b528ed0c71..47f44b6467 100644 --- a/libavcodec/pcm_rechunk_bsf.c +++ b/libavcodec/pcm_rechunk_bsf.c @@ -19,7 +19,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "libavutil/avassert.h" #include "libavutil/opt.h" diff --git a/libavcodec/prores_metadata_bsf.c b/libavcodec/prores_metadata_bsf.c index 7cc2320795..328ed88591 100644 --- a/libavcodec/prores_metadata_bsf.c +++ b/libavcodec/prores_metadata_bsf.c @@ -28,7 +28,7 @@ #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" typedef struct ProresMetadataContext { const AVClass *class; diff --git a/libavcodec/remove_extradata_bsf.c b/libavcodec/remove_extradata_bsf.c index b762079e05..7ea12d260a 100644 --- a/libavcodec/remove_extradata_bsf.c +++ b/libavcodec/remove_extradata_bsf.c @@ -22,7 +22,7 @@ #include "libavutil/opt.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" enum RemoveFreq { REMOVE_FREQ_KEYFRAME, diff --git a/libavcodec/trace_headers_bsf.c b/libavcodec/trace_headers_bsf.c index 3ec78fe822..ffd4e5465b 100644 --- a/libavcodec/trace_headers_bsf.c +++ b/libavcodec/trace_headers_bsf.c @@ -22,7 +22,7 @@ #include "libavutil/common.h" #include "libavutil/log.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" diff --git a/libavcodec/truehd_core_bsf.c b/libavcodec/truehd_core_bsf.c index dfe291d9e9..8235648588 100644 --- a/libavcodec/truehd_core_bsf.c +++ b/libavcodec/truehd_core_bsf.c @@ -19,7 +19,7 @@ */ #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "get_bits.h" #include "mlp_parse.h" #include "mlp.h" diff --git a/libavcodec/vp9_metadata_bsf.c b/libavcodec/vp9_metadata_bsf.c index 52e962b1c0..974a5fc6dd 100644 --- a/libavcodec/vp9_metadata_bsf.c +++ b/libavcodec/vp9_metadata_bsf.c @@ -20,7 +20,7 @@ #include "libavutil/common.h" #include "libavutil/opt.h" -#include "bsf.h" +#include "bsf_internal.h" #include "cbs.h" #include "cbs_vp9.h" diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c index 2a1bdb9ba7..ad9f4ce77a 100644 --- a/libavcodec/vp9_raw_reorder_bsf.c +++ b/libavcodec/vp9_raw_reorder_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/log.h" #include "libavutil/mem.h" -#include "bsf.h" +#include "bsf_internal.h" #include "get_bits.h" #include "put_bits.h" diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c index b79911bb2c..2584604817 100644 --- a/libavcodec/vp9_superframe_bsf.c +++ b/libavcodec/vp9_superframe_bsf.c @@ -21,7 +21,7 @@ #include "libavutil/avassert.h" #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "get_bits.h" #define MAX_CACHE 8 diff --git a/libavcodec/vp9_superframe_split_bsf.c b/libavcodec/vp9_superframe_split_bsf.c index 13e85c3ca4..00f40aa96e 100644 --- a/libavcodec/vp9_superframe_split_bsf.c +++ b/libavcodec/vp9_superframe_split_bsf.c @@ -25,7 +25,7 @@ #include #include "avcodec.h" -#include "bsf.h" +#include "bsf_internal.h" #include "bytestream.h" #include "get_bits.h" diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index f3e584fdf4..5d9f90075d 100644 --- a/tools/target_bsf_fuzzer.c +++ b/tools/target_bsf_fuzzer.c @@ -20,7 +20,7 @@ #include "libavutil/imgutils.h" #include "libavcodec/avcodec.h" -#include "libavcodec/bsf.h" +#include "libavcodec/bsf_internal.h" #include "libavcodec/bytestream.h" #include "libavcodec/internal.h" -- cgit v1.2.3