mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-30 19:58:17 +00:00
avcodec/avcodec: Schedule moving private fields of AVCodecParser out of avcodec.h
AVCodecParser has several fields which are not really meant
to be accessed by users, but it has no public-private
demarkation line, so these fields are technically public
and can therefore not simply be made private like
20f9727018 did for AVCodec.*
This commit therefore deprecates these fields and
schedules them to become private. All parsers have already
been switched to FFCodecParser, which (for now) is a union
of AVCodecParser and an unnamed clone of AVCodecParser
(new fields can be added at the end of this clone).
*: This is also the reason why split has never been removed despite
not being set for several years now.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -4398,7 +4398,7 @@ CODEC_LIST="
|
||||
$ENCODER_LIST
|
||||
$DECODER_LIST
|
||||
"
|
||||
PARSER_LIST=$(find_things_extern parser AVCodecParser libavcodec/parsers.c)
|
||||
PARSER_LIST=$(find_things_extern parser FFCodecParser libavcodec/parsers.c)
|
||||
BSF_LIST=$(find_things_extern bsf FFBitStreamFilter libavcodec/bitstream_filters.c)
|
||||
HWACCEL_LIST=$(find_things_extern hwaccel FFHWAccel libavcodec/hwaccels.h)
|
||||
PROTOCOL_LIST=$(find_things_extern protocol URLProtocol libavformat/protocols.c)
|
||||
@@ -8595,7 +8595,7 @@ print_enabled_components(){
|
||||
|
||||
print_enabled_components libavfilter/filter_list.c FFFilter filter_list $FILTER_LIST
|
||||
print_enabled_components libavcodec/codec_list.c FFCodec codec_list $CODEC_LIST
|
||||
print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
|
||||
print_enabled_components libavcodec/parser_list.c FFCodecParser parser_list $PARSER_LIST
|
||||
print_enabled_components libavcodec/bsf_list.c FFBitStreamFilter bitstream_filters $BSF_LIST
|
||||
print_enabled_components libavformat/demuxer_list.c FFInputFormat demuxer_list $DEMUXER_LIST
|
||||
print_enabled_components libavformat/muxer_list.c FFOutputFormat muxer_list $MUXER_LIST
|
||||
|
||||
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2025-03-28
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2025-11-01 - xxxxxxxxxx - lavc 62.18.100 - avcodec.h
|
||||
Deprecate AVCodecParser fields priv_data_size, parser_init,
|
||||
parser_parse, parser_close, and split with no replacement.
|
||||
|
||||
2025-10-30 - xxxxxxxxxx - lavc 62.17.100 - packet.h
|
||||
Add av_packet_side_data_from_frame() and av_packet_side_data_to_frame().
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
|
||||
}
|
||||
|
||||
|
||||
const AVCodecParser ff_aac_parser = {
|
||||
const FFCodecParser ff_aac_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AAC),
|
||||
.priv_data_size = sizeof(AACAC3ParseContext),
|
||||
.parser_init = aac_parse_init,
|
||||
|
||||
@@ -478,7 +478,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
|
||||
}
|
||||
|
||||
|
||||
const AVCodecParser ff_ac3_parser = {
|
||||
const FFCodecParser ff_ac3_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3),
|
||||
.priv_data_size = sizeof(AACAC3ParseContext),
|
||||
.parser_init = ac3_parse_init,
|
||||
|
||||
@@ -98,7 +98,7 @@ static int adx_parse(AVCodecParserContext *s1,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_adx_parser = {
|
||||
const FFCodecParser ff_adx_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_ADPCM_ADX),
|
||||
.priv_data_size = sizeof(ADXParseContext),
|
||||
.parser_parse = adx_parse,
|
||||
|
||||
@@ -71,7 +71,7 @@ static int ahx_parse(AVCodecParserContext *s1,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_ahx_parser = {
|
||||
const FFCodecParser ff_ahx_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AHX),
|
||||
.priv_data_size = sizeof(AHXParseContext),
|
||||
.parser_parse = ahx_parse,
|
||||
|
||||
@@ -123,7 +123,7 @@ static int amr_parse(AVCodecParserContext *s1,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_amr_parser = {
|
||||
const FFCodecParser ff_amr_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AMR_NB, AV_CODEC_ID_AMR_WB),
|
||||
.priv_data_size = sizeof(AMRParseContext),
|
||||
.parser_init = amr_parse_init,
|
||||
|
||||
@@ -141,7 +141,7 @@ static av_cold void close(AVCodecParserContext *s)
|
||||
ff_cbs_close(&p->cbc);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_apv_parser = {
|
||||
const FFCodecParser ff_apv_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_APV),
|
||||
.priv_data_size = sizeof(APVParseContext),
|
||||
.parser_init = init,
|
||||
|
||||
@@ -210,7 +210,7 @@ static av_cold void av1_parser_close(AVCodecParserContext *ctx)
|
||||
ff_cbs_close(&s->cbc);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_av1_parser = {
|
||||
const FFCodecParser ff_av1_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AV1),
|
||||
.priv_data_size = sizeof(AV1ParseContext),
|
||||
.parser_init = av1_parser_init,
|
||||
|
||||
@@ -2733,16 +2733,30 @@ typedef struct AVCodecParserContext {
|
||||
|
||||
typedef struct AVCodecParser {
|
||||
int codec_ids[7]; /* several codec IDs are permitted */
|
||||
#if FF_API_PARSER_PRIVATE
|
||||
/*****************************************************************
|
||||
* All fields below this line are not part of the public API. They
|
||||
* may not be used outside of libavcodec and can be changed and
|
||||
* removed at will.
|
||||
* New public fields should be added right above.
|
||||
*****************************************************************
|
||||
*/
|
||||
attribute_deprecated
|
||||
int priv_data_size;
|
||||
attribute_deprecated
|
||||
int (*parser_init)(AVCodecParserContext *s);
|
||||
/* This callback never returns an error, a negative value means that
|
||||
* the frame start was in a previous packet. */
|
||||
attribute_deprecated
|
||||
int (*parser_parse)(AVCodecParserContext *s,
|
||||
AVCodecContext *avctx,
|
||||
const uint8_t **poutbuf, int *poutbuf_size,
|
||||
const uint8_t *buf, int buf_size);
|
||||
attribute_deprecated
|
||||
void (*parser_close)(AVCodecParserContext *s);
|
||||
attribute_deprecated
|
||||
int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
|
||||
#endif
|
||||
} AVCodecParser;
|
||||
|
||||
/**
|
||||
|
||||
@@ -190,7 +190,7 @@ static int avs2_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_avs2_parser = {
|
||||
const FFCodecParser ff_avs2_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AVS2),
|
||||
.priv_data_size = sizeof(ParseContext),
|
||||
.parser_parse = avs2_parse,
|
||||
|
||||
@@ -173,7 +173,7 @@ static int avs3_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_avs3_parser = {
|
||||
const FFCodecParser ff_avs3_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AVS3),
|
||||
.priv_data_size = sizeof(ParseContext),
|
||||
.parser_parse = avs3_parse,
|
||||
|
||||
@@ -106,7 +106,7 @@ flush:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_bmp_parser = {
|
||||
const FFCodecParser ff_bmp_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_BMP),
|
||||
.priv_data_size = sizeof(BMPParseContext),
|
||||
.parser_parse = bmp_parse,
|
||||
|
||||
@@ -97,7 +97,7 @@ static int cavsvideo_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_cavsvideo_parser = {
|
||||
const FFCodecParser ff_cavsvideo_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_CAVS),
|
||||
.priv_data_size = sizeof(ParseContext),
|
||||
.parser_parse = cavsvideo_parse,
|
||||
|
||||
@@ -54,7 +54,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_cook_parser = {
|
||||
const FFCodecParser ff_cook_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_COOK),
|
||||
.priv_data_size = sizeof(CookParseContext),
|
||||
.parser_parse = cook_parse,
|
||||
|
||||
@@ -98,7 +98,7 @@ static int cri_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_cri_parser = {
|
||||
const FFCodecParser ff_cri_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_CRI),
|
||||
.priv_data_size = sizeof(CRIParser),
|
||||
.parser_parse = cri_parse,
|
||||
|
||||
@@ -344,7 +344,7 @@ static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dca_parser = {
|
||||
const FFCodecParser ff_dca_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DTS),
|
||||
.priv_data_size = sizeof(DCAParseContext),
|
||||
.parser_init = dca_parse_init,
|
||||
|
||||
@@ -275,7 +275,7 @@ static av_cold void dirac_parse_close(AVCodecParserContext *s)
|
||||
av_freep(&pc->buffer);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dirac_parser = {
|
||||
const FFCodecParser ff_dirac_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DIRAC),
|
||||
.priv_data_size = sizeof(DiracParseContext),
|
||||
.parser_parse = dirac_parse,
|
||||
|
||||
@@ -139,7 +139,7 @@ static int dnxhd_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dnxhd_parser = {
|
||||
const FFCodecParser ff_dnxhd_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DNXHD),
|
||||
.priv_data_size = sizeof(DNXHDParserContext),
|
||||
.parser_parse = dnxhd_parse,
|
||||
|
||||
@@ -82,7 +82,7 @@ static int dnxuc_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dnxuc_parser = {
|
||||
const FFCodecParser ff_dnxuc_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DNXUC),
|
||||
.priv_data_size = sizeof(DNxUcParseContext),
|
||||
.parser_parse = dnxuc_parse,
|
||||
|
||||
@@ -66,7 +66,7 @@ end:
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dolby_e_parser = {
|
||||
const FFCodecParser ff_dolby_e_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DOLBY_E),
|
||||
.priv_data_size = sizeof(DBEParseContext),
|
||||
.parser_parse = dolby_e_parse,
|
||||
|
||||
@@ -109,7 +109,7 @@ flush:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dpx_parser = {
|
||||
const FFCodecParser ff_dpx_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DPX),
|
||||
.priv_data_size = sizeof(DPXParseContext),
|
||||
.parser_parse = dpx_parse,
|
||||
|
||||
@@ -41,7 +41,7 @@ static int dvaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dvaudio_parser = {
|
||||
const FFCodecParser ff_dvaudio_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DVAUDIO),
|
||||
.parser_parse = dvaudio_parse,
|
||||
};
|
||||
|
||||
@@ -164,7 +164,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dvbsub_parser = {
|
||||
const FFCodecParser ff_dvbsub_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DVB_SUBTITLE),
|
||||
.priv_data_size = sizeof(DVBSubParseContext),
|
||||
.parser_parse = dvbsub_parse,
|
||||
|
||||
@@ -108,7 +108,7 @@ static int dvd_nav_parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dvd_nav_parser = {
|
||||
const FFCodecParser ff_dvd_nav_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DVD_NAV),
|
||||
.priv_data_size = sizeof(DVDNavParseContext),
|
||||
.parser_init = dvd_nav_parse_init,
|
||||
|
||||
@@ -85,7 +85,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s)
|
||||
av_freep(&pc->packet);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_dvdsub_parser = {
|
||||
const FFCodecParser ff_dvdsub_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_DVD_SUBTITLE),
|
||||
.priv_data_size = sizeof(DVDSubParseContext),
|
||||
.parser_parse = dvdsub_parse,
|
||||
|
||||
@@ -372,7 +372,7 @@ static av_cold void evc_parser_close(AVCodecParserContext *s)
|
||||
ff_evc_ps_free(&ctx->ps);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_evc_parser = {
|
||||
const FFCodecParser ff_evc_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_EVC),
|
||||
.priv_data_size = sizeof(EVCParserContext),
|
||||
.parser_parse = evc_parse,
|
||||
|
||||
@@ -81,7 +81,7 @@ static av_cold void ffv1_close(AVCodecParserContext *s)
|
||||
ff_ffv1_close(&p->f);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_ffv1_parser = {
|
||||
const FFCodecParser ff_ffv1_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_FFV1),
|
||||
.priv_data_size = sizeof(FFV1ParseContext),
|
||||
.parser_parse = parse,
|
||||
|
||||
@@ -903,7 +903,7 @@ static av_cold void flac_parse_close(AVCodecParserContext *c)
|
||||
av_freep(&fpc->wrap_buf);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_flac_parser = {
|
||||
const FFCodecParser ff_flac_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_FLAC),
|
||||
.priv_data_size = sizeof(FLACParseContext),
|
||||
.parser_init = flac_parse_init,
|
||||
|
||||
@@ -97,7 +97,7 @@ static int ftr_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_ftr_parser = {
|
||||
const FFCodecParser ff_ftr_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_FTR),
|
||||
.priv_data_size = sizeof(FTRParseContext),
|
||||
.parser_parse = ftr_parse,
|
||||
|
||||
@@ -53,7 +53,7 @@ static int g723_1_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_g723_1_parser = {
|
||||
const FFCodecParser ff_g723_1_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_G723_1),
|
||||
.priv_data_size = sizeof(G723_1ParseContext),
|
||||
.parser_parse = g723_1_parse,
|
||||
|
||||
@@ -85,7 +85,7 @@ static int g729_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_g729_parser = {
|
||||
const FFCodecParser ff_g729_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_G729, AV_CODEC_ID_ACELP_KELVIN),
|
||||
.priv_data_size = sizeof(G729ParseContext),
|
||||
.parser_parse = g729_parse,
|
||||
|
||||
@@ -201,7 +201,7 @@ static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_gif_parser = {
|
||||
const FFCodecParser ff_gif_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_GIF),
|
||||
.priv_data_size = sizeof(GIFParseContext),
|
||||
.parser_parse = gif_parse,
|
||||
|
||||
@@ -84,7 +84,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_gsm_parser = {
|
||||
const FFCodecParser ff_gsm_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_GSM, AV_CODEC_ID_GSM_MS),
|
||||
.priv_data_size = sizeof(GSMParseContext),
|
||||
.parser_parse = gsm_parse,
|
||||
|
||||
@@ -87,7 +87,7 @@ static int h261_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_h261_parser = {
|
||||
const FFCodecParser ff_h261_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_H261),
|
||||
.priv_data_size = sizeof(ParseContext),
|
||||
.parser_parse = h261_parse,
|
||||
|
||||
@@ -88,7 +88,7 @@ static int h263_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_h263_parser = {
|
||||
const FFCodecParser ff_h263_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_H263),
|
||||
.priv_data_size = sizeof(ParseContext),
|
||||
.parser_parse = h263_parse,
|
||||
|
||||
@@ -683,7 +683,7 @@ static av_cold int init(AVCodecParserContext *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_h264_parser = {
|
||||
const FFCodecParser ff_h264_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_H264),
|
||||
.priv_data_size = sizeof(H264ParseContext),
|
||||
.parser_init = init,
|
||||
|
||||
@@ -72,7 +72,7 @@ static int hdr_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_hdr_parser = {
|
||||
const FFCodecParser ff_hdr_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_RADIANCE_HDR),
|
||||
.priv_data_size = sizeof(HDRParseContext),
|
||||
.parser_parse = hdr_parse,
|
||||
|
||||
@@ -353,7 +353,7 @@ static void hevc_parser_close(AVCodecParserContext *s)
|
||||
av_freep(&ctx->pc.buffer);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_hevc_parser = {
|
||||
const FFCodecParser ff_hevc_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_HEVC),
|
||||
.priv_data_size = sizeof(HEVCParserContext),
|
||||
.parser_parse = hevc_parse,
|
||||
|
||||
@@ -70,7 +70,7 @@ static int ipu_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_ipu_parser = {
|
||||
const FFCodecParser ff_ipu_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_IPU),
|
||||
.priv_data_size = sizeof(IPUParseContext),
|
||||
.parser_parse = ipu_parse,
|
||||
|
||||
@@ -212,7 +212,7 @@ static int jpeg2000_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_jpeg2000_parser = {
|
||||
const FFCodecParser ff_jpeg2000_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_JPEG2000),
|
||||
.priv_data_size = sizeof(JPEG2000ParserContext),
|
||||
.parser_parse = jpeg2000_parse,
|
||||
|
||||
@@ -1546,7 +1546,7 @@ flush:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_jpegxl_parser = {
|
||||
const FFCodecParser ff_jpegxl_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_JPEGXL, AV_CODEC_ID_JPEGXL_ANIM),
|
||||
.priv_data_size = sizeof(JXLParseContext),
|
||||
.parser_parse = jpegxl_parse,
|
||||
|
||||
@@ -105,7 +105,7 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_aac_latm_parser = {
|
||||
const FFCodecParser ff_aac_latm_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_AAC_LATM),
|
||||
.priv_data_size = sizeof(LATMParseContext),
|
||||
.parser_parse = latm_parse,
|
||||
|
||||
@@ -74,7 +74,7 @@ static int misc4_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_misc4_parser = {
|
||||
const FFCodecParser ff_misc4_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MISC4),
|
||||
.priv_data_size = sizeof(MISC4Context),
|
||||
.parser_parse = misc4_parse,
|
||||
|
||||
@@ -129,7 +129,7 @@ static int jpeg_parse(AVCodecParserContext *s,
|
||||
}
|
||||
|
||||
|
||||
const AVCodecParser ff_mjpeg_parser = {
|
||||
const FFCodecParser ff_mjpeg_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MJPEG, AV_CODEC_ID_JPEGLS),
|
||||
.priv_data_size = sizeof(MJPEGParserContext),
|
||||
.parser_parse = jpeg_parse,
|
||||
|
||||
@@ -205,7 +205,7 @@ lost_sync:
|
||||
return 1;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_mlp_parser = {
|
||||
const FFCodecParser ff_mlp_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MLP, AV_CODEC_ID_TRUEHD),
|
||||
.priv_data_size = sizeof(MLPParseContext),
|
||||
.parser_init = mlp_init,
|
||||
|
||||
@@ -156,7 +156,7 @@ static int mpeg4video_parse(AVCodecParserContext *s,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_mpeg4video_parser = {
|
||||
const FFCodecParser ff_mpeg4video_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MPEG4),
|
||||
.priv_data_size = sizeof(struct Mp4vParseContext),
|
||||
.parser_init = mpeg4video_parse_init,
|
||||
|
||||
@@ -137,7 +137,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
||||
}
|
||||
|
||||
|
||||
const AVCodecParser ff_mpegaudio_parser = {
|
||||
const FFCodecParser ff_mpegaudio_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MP1, AV_CODEC_ID_MP2,
|
||||
AV_CODEC_ID_MP3, AV_CODEC_ID_MP3ADU),
|
||||
.priv_data_size = sizeof(MpegAudioParseContext),
|
||||
|
||||
@@ -300,7 +300,7 @@ static av_cold int mpegvideo_parse_init(AVCodecParserContext *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_mpegvideo_parser = {
|
||||
const FFCodecParser ff_mpegvideo_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO),
|
||||
.priv_data_size = sizeof(struct MpvParseContext),
|
||||
.parser_init = mpegvideo_parse_init,
|
||||
|
||||
@@ -214,7 +214,7 @@ fail:
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_opus_parser = {
|
||||
const FFCodecParser ff_opus_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_OPUS),
|
||||
.priv_data_size = sizeof(OpusParserContext),
|
||||
.parser_parse = opus_parse,
|
||||
|
||||
@@ -29,11 +29,13 @@
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#include "parser.h"
|
||||
#include "parser_internal.h"
|
||||
|
||||
av_cold AVCodecParserContext *av_parser_init(int codec_id)
|
||||
{
|
||||
AVCodecParserContext *s = NULL;
|
||||
const AVCodecParser *parser;
|
||||
const FFCodecParser *ffparser;
|
||||
void *i = 0;
|
||||
int ret;
|
||||
|
||||
@@ -53,17 +55,18 @@ av_cold AVCodecParserContext *av_parser_init(int codec_id)
|
||||
return NULL;
|
||||
|
||||
found:
|
||||
ffparser = ffcodecparser(parser);
|
||||
s = av_mallocz(sizeof(AVCodecParserContext));
|
||||
if (!s)
|
||||
goto err_out;
|
||||
s->parser = parser;
|
||||
s->priv_data = av_mallocz(parser->priv_data_size);
|
||||
s->priv_data = av_mallocz(ffparser->priv_data_size);
|
||||
if (!s->priv_data)
|
||||
goto err_out;
|
||||
s->fetch_timestamp=1;
|
||||
s->pict_type = AV_PICTURE_TYPE_I;
|
||||
if (parser->parser_init) {
|
||||
ret = parser->parser_init(s);
|
||||
if (ffparser->parser_init) {
|
||||
ret = ffparser->parser_init(s);
|
||||
if (ret != 0)
|
||||
goto err_out;
|
||||
}
|
||||
@@ -161,8 +164,8 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
ff_fetch_timestamp(s, 0, 0, 0);
|
||||
}
|
||||
/* WARNING: the returned index can be negative */
|
||||
index = s->parser->parser_parse(s, avctx, (const uint8_t **) poutbuf,
|
||||
poutbuf_size, buf, buf_size);
|
||||
index = ffcodecparser(s->parser)->parser_parse(s, avctx, (const uint8_t **) poutbuf,
|
||||
poutbuf_size, buf, buf_size);
|
||||
av_assert0(index > -0x20000000); // The API does not allow returning AVERROR codes
|
||||
#define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name
|
||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
@@ -194,8 +197,8 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
av_cold void av_parser_close(AVCodecParserContext *s)
|
||||
{
|
||||
if (s) {
|
||||
if (s->parser->parser_close)
|
||||
s->parser->parser_close(s);
|
||||
if (ffcodecparser(s->parser)->parser_close)
|
||||
ffcodecparser(s->parser)->parser_close(s);
|
||||
av_freep(&s->priv_data);
|
||||
av_free(s);
|
||||
}
|
||||
|
||||
@@ -19,9 +19,44 @@
|
||||
#ifndef AVCODEC_PARSER_INTERNAL_H
|
||||
#define AVCODEC_PARSER_INTERNAL_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/macros.h"
|
||||
#include "avcodec.h"
|
||||
#include "codec_id.h"
|
||||
|
||||
#if FF_API_PARSER_PRIVATE
|
||||
typedef union FFCodecParser {
|
||||
struct {
|
||||
int codec_ids[7]; /* several codec IDs are permitted */
|
||||
int priv_data_size;
|
||||
int (*parser_init)(AVCodecParserContext *s);
|
||||
int (*parser_parse)(AVCodecParserContext *s,
|
||||
AVCodecContext *avctx,
|
||||
const uint8_t **poutbuf, int *poutbuf_size,
|
||||
const uint8_t *buf, int buf_size);
|
||||
void (*parser_close)(AVCodecParserContext *s);
|
||||
int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
|
||||
};
|
||||
AVCodecParser p;
|
||||
#else
|
||||
typedef struct FFCodecParser {
|
||||
AVCodecParser p;
|
||||
unsigned priv_data_size;
|
||||
int (*parser_init)(AVCodecParserContext *s);
|
||||
int (*parser_parse)(AVCodecParserContext *s,
|
||||
AVCodecContext *avctx,
|
||||
const uint8_t **poutbuf, int *poutbuf_size,
|
||||
const uint8_t *buf, int buf_size);
|
||||
void (*parser_close)(AVCodecParserContext *s);
|
||||
#endif
|
||||
} FFCodecParser;
|
||||
|
||||
static inline const FFCodecParser *ffcodecparser(const AVCodecParser *parser)
|
||||
{
|
||||
return (const FFCodecParser*)parser;
|
||||
}
|
||||
|
||||
#define EIGTH_ARG(a,b,c,d,e,f,g,h,...) h
|
||||
#define NO_FAIL
|
||||
// Expands to nothing if <= 7 args; induces compilation failure if not.
|
||||
@@ -32,7 +67,13 @@
|
||||
#define FIRST_SEVEN2(a,b,c,d,e,f,g,...) a,b,c,d,e,f,g
|
||||
#define FIRST_SEVEN(...) PASSTHROUGH(FIRST_SEVEN2(__VA_ARGS__))
|
||||
#define TIMES_SEVEN(a) a,a,a,a,a,a,a
|
||||
|
||||
#if FF_API_PARSER_PRIVATE
|
||||
#define PARSER_CODEC_LIST(...) CHECK_FOR_TOO_MANY_IDS(__VA_ARGS__) \
|
||||
.codec_ids = { FIRST_SEVEN(__VA_ARGS__, TIMES_SEVEN(AV_CODEC_ID_NONE)) }
|
||||
#else
|
||||
#define PARSER_CODEC_LIST(...) CHECK_FOR_TOO_MANY_IDS(__VA_ARGS__) \
|
||||
.p.codec_ids = { FIRST_SEVEN(__VA_ARGS__, TIMES_SEVEN(AV_CODEC_ID_NONE)) }
|
||||
#endif
|
||||
|
||||
#endif /* AVCODEC_PARSER_INTERNAL_H */
|
||||
|
||||
@@ -19,83 +19,98 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "parser_internal.h"
|
||||
|
||||
extern const AVCodecParser ff_aac_parser;
|
||||
extern const AVCodecParser ff_aac_latm_parser;
|
||||
extern const AVCodecParser ff_ac3_parser;
|
||||
extern const AVCodecParser ff_adx_parser;
|
||||
extern const AVCodecParser ff_ahx_parser;
|
||||
extern const AVCodecParser ff_amr_parser;
|
||||
extern const AVCodecParser ff_apv_parser;
|
||||
extern const AVCodecParser ff_av1_parser;
|
||||
extern const AVCodecParser ff_avs2_parser;
|
||||
extern const AVCodecParser ff_avs3_parser;
|
||||
extern const AVCodecParser ff_bmp_parser;
|
||||
extern const AVCodecParser ff_cavsvideo_parser;
|
||||
extern const AVCodecParser ff_cook_parser;
|
||||
extern const AVCodecParser ff_cri_parser;
|
||||
extern const AVCodecParser ff_dca_parser;
|
||||
extern const AVCodecParser ff_dirac_parser;
|
||||
extern const AVCodecParser ff_dnxhd_parser;
|
||||
extern const AVCodecParser ff_dnxuc_parser;
|
||||
extern const AVCodecParser ff_dolby_e_parser;
|
||||
extern const AVCodecParser ff_dpx_parser;
|
||||
extern const AVCodecParser ff_dvaudio_parser;
|
||||
extern const AVCodecParser ff_dvbsub_parser;
|
||||
extern const AVCodecParser ff_dvdsub_parser;
|
||||
extern const AVCodecParser ff_dvd_nav_parser;
|
||||
extern const AVCodecParser ff_evc_parser;
|
||||
extern const AVCodecParser ff_flac_parser;
|
||||
extern const AVCodecParser ff_ftr_parser;
|
||||
extern const AVCodecParser ff_ffv1_parser;
|
||||
extern const AVCodecParser ff_g723_1_parser;
|
||||
extern const AVCodecParser ff_g729_parser;
|
||||
extern const AVCodecParser ff_gif_parser;
|
||||
extern const AVCodecParser ff_gsm_parser;
|
||||
extern const AVCodecParser ff_h261_parser;
|
||||
extern const AVCodecParser ff_h263_parser;
|
||||
extern const AVCodecParser ff_h264_parser;
|
||||
extern const AVCodecParser ff_hevc_parser;
|
||||
extern const AVCodecParser ff_hdr_parser;
|
||||
extern const AVCodecParser ff_ipu_parser;
|
||||
extern const AVCodecParser ff_jpeg2000_parser;
|
||||
extern const AVCodecParser ff_jpegxl_parser;
|
||||
extern const AVCodecParser ff_misc4_parser;
|
||||
extern const AVCodecParser ff_mjpeg_parser;
|
||||
extern const AVCodecParser ff_mlp_parser;
|
||||
extern const AVCodecParser ff_mpeg4video_parser;
|
||||
extern const AVCodecParser ff_mpegaudio_parser;
|
||||
extern const AVCodecParser ff_mpegvideo_parser;
|
||||
extern const AVCodecParser ff_opus_parser;
|
||||
extern const AVCodecParser ff_prores_parser;
|
||||
extern const AVCodecParser ff_png_parser;
|
||||
extern const AVCodecParser ff_pnm_parser;
|
||||
extern const AVCodecParser ff_prores_raw_parser;
|
||||
extern const AVCodecParser ff_qoi_parser;
|
||||
extern const AVCodecParser ff_rv34_parser;
|
||||
extern const AVCodecParser ff_sbc_parser;
|
||||
extern const AVCodecParser ff_sipr_parser;
|
||||
extern const AVCodecParser ff_tak_parser;
|
||||
extern const AVCodecParser ff_vc1_parser;
|
||||
extern const AVCodecParser ff_vorbis_parser;
|
||||
extern const AVCodecParser ff_vp3_parser;
|
||||
extern const AVCodecParser ff_vp8_parser;
|
||||
extern const AVCodecParser ff_vp9_parser;
|
||||
extern const AVCodecParser ff_vvc_parser;
|
||||
extern const AVCodecParser ff_webp_parser;
|
||||
extern const AVCodecParser ff_xbm_parser;
|
||||
extern const AVCodecParser ff_xma_parser;
|
||||
extern const AVCodecParser ff_xwd_parser;
|
||||
#if FF_API_PARSER_PRIVATE
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#define CHECK_OFFSET(field) static_assert(offsetof(FFCodecParser, field) == offsetof(FFCodecParser, p.field), "Wrong offsets")
|
||||
CHECK_OFFSET(codec_ids);
|
||||
CHECK_OFFSET(priv_data_size);
|
||||
CHECK_OFFSET(parser_init);
|
||||
CHECK_OFFSET(parser_parse);
|
||||
CHECK_OFFSET(parser_close);
|
||||
CHECK_OFFSET(split);
|
||||
#endif
|
||||
|
||||
extern const FFCodecParser ff_aac_parser;
|
||||
extern const FFCodecParser ff_aac_latm_parser;
|
||||
extern const FFCodecParser ff_ac3_parser;
|
||||
extern const FFCodecParser ff_adx_parser;
|
||||
extern const FFCodecParser ff_ahx_parser;
|
||||
extern const FFCodecParser ff_amr_parser;
|
||||
extern const FFCodecParser ff_apv_parser;
|
||||
extern const FFCodecParser ff_av1_parser;
|
||||
extern const FFCodecParser ff_avs2_parser;
|
||||
extern const FFCodecParser ff_avs3_parser;
|
||||
extern const FFCodecParser ff_bmp_parser;
|
||||
extern const FFCodecParser ff_cavsvideo_parser;
|
||||
extern const FFCodecParser ff_cook_parser;
|
||||
extern const FFCodecParser ff_cri_parser;
|
||||
extern const FFCodecParser ff_dca_parser;
|
||||
extern const FFCodecParser ff_dirac_parser;
|
||||
extern const FFCodecParser ff_dnxhd_parser;
|
||||
extern const FFCodecParser ff_dnxuc_parser;
|
||||
extern const FFCodecParser ff_dolby_e_parser;
|
||||
extern const FFCodecParser ff_dpx_parser;
|
||||
extern const FFCodecParser ff_dvaudio_parser;
|
||||
extern const FFCodecParser ff_dvbsub_parser;
|
||||
extern const FFCodecParser ff_dvdsub_parser;
|
||||
extern const FFCodecParser ff_dvd_nav_parser;
|
||||
extern const FFCodecParser ff_evc_parser;
|
||||
extern const FFCodecParser ff_flac_parser;
|
||||
extern const FFCodecParser ff_ftr_parser;
|
||||
extern const FFCodecParser ff_ffv1_parser;
|
||||
extern const FFCodecParser ff_g723_1_parser;
|
||||
extern const FFCodecParser ff_g729_parser;
|
||||
extern const FFCodecParser ff_gif_parser;
|
||||
extern const FFCodecParser ff_gsm_parser;
|
||||
extern const FFCodecParser ff_h261_parser;
|
||||
extern const FFCodecParser ff_h263_parser;
|
||||
extern const FFCodecParser ff_h264_parser;
|
||||
extern const FFCodecParser ff_hevc_parser;
|
||||
extern const FFCodecParser ff_hdr_parser;
|
||||
extern const FFCodecParser ff_ipu_parser;
|
||||
extern const FFCodecParser ff_jpeg2000_parser;
|
||||
extern const FFCodecParser ff_jpegxl_parser;
|
||||
extern const FFCodecParser ff_misc4_parser;
|
||||
extern const FFCodecParser ff_mjpeg_parser;
|
||||
extern const FFCodecParser ff_mlp_parser;
|
||||
extern const FFCodecParser ff_mpeg4video_parser;
|
||||
extern const FFCodecParser ff_mpegaudio_parser;
|
||||
extern const FFCodecParser ff_mpegvideo_parser;
|
||||
extern const FFCodecParser ff_opus_parser;
|
||||
extern const FFCodecParser ff_prores_parser;
|
||||
extern const FFCodecParser ff_png_parser;
|
||||
extern const FFCodecParser ff_pnm_parser;
|
||||
extern const FFCodecParser ff_prores_raw_parser;
|
||||
extern const FFCodecParser ff_qoi_parser;
|
||||
extern const FFCodecParser ff_rv34_parser;
|
||||
extern const FFCodecParser ff_sbc_parser;
|
||||
extern const FFCodecParser ff_sipr_parser;
|
||||
extern const FFCodecParser ff_tak_parser;
|
||||
extern const FFCodecParser ff_vc1_parser;
|
||||
extern const FFCodecParser ff_vorbis_parser;
|
||||
extern const FFCodecParser ff_vp3_parser;
|
||||
extern const FFCodecParser ff_vp8_parser;
|
||||
extern const FFCodecParser ff_vp9_parser;
|
||||
extern const FFCodecParser ff_vvc_parser;
|
||||
extern const FFCodecParser ff_webp_parser;
|
||||
extern const FFCodecParser ff_xbm_parser;
|
||||
extern const FFCodecParser ff_xma_parser;
|
||||
extern const FFCodecParser ff_xwd_parser;
|
||||
|
||||
#include "libavcodec/parser_list.c"
|
||||
|
||||
const AVCodecParser *av_parser_iterate(void **opaque)
|
||||
{
|
||||
uintptr_t i = (uintptr_t)*opaque;
|
||||
const AVCodecParser *p = parser_list[i];
|
||||
const FFCodecParser *p = parser_list[i];
|
||||
|
||||
if (p)
|
||||
if (p) {
|
||||
*opaque = (void*)(i + 1);
|
||||
return &p->p;
|
||||
}
|
||||
|
||||
return p;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ flush:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_png_parser = {
|
||||
const FFCodecParser ff_png_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_PNG),
|
||||
.priv_data_size = sizeof(PNGParseContext),
|
||||
.parser_parse = png_parse,
|
||||
|
||||
@@ -134,7 +134,7 @@ end:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_pnm_parser = {
|
||||
const FFCodecParser ff_pnm_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PPM,
|
||||
AV_CODEC_ID_PBM, AV_CODEC_ID_PAM, AV_CODEC_ID_PFM,
|
||||
AV_CODEC_ID_PHM),
|
||||
|
||||
@@ -123,7 +123,7 @@ static int parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_prores_parser = {
|
||||
const FFCodecParser ff_prores_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_PRORES),
|
||||
.parser_parse = parse,
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ static int prores_raw_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_prores_raw_parser = {
|
||||
const FFCodecParser ff_prores_raw_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_PRORES_RAW),
|
||||
.parser_parse = prores_raw_parse,
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ static int qoi_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_qoi_parser = {
|
||||
const FFCodecParser ff_qoi_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_QOI),
|
||||
.priv_data_size = sizeof(QOIParseContext),
|
||||
.parser_parse = qoi_parse,
|
||||
|
||||
@@ -76,7 +76,7 @@ static int rv34_parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_rv34_parser = {
|
||||
const FFCodecParser ff_rv34_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_RV30, AV_CODEC_ID_RV40),
|
||||
.priv_data_size = sizeof(RV34ParseContext),
|
||||
.parser_parse = rv34_parse,
|
||||
|
||||
@@ -117,7 +117,7 @@ static int sbc_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_sbc_parser = {
|
||||
const FFCodecParser ff_sbc_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_SBC),
|
||||
.priv_data_size = sizeof(SBCParseContext),
|
||||
.parser_parse = sbc_parse,
|
||||
|
||||
@@ -67,7 +67,7 @@ static int sipr_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_sipr_parser = {
|
||||
const FFCodecParser ff_sipr_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_SIPR),
|
||||
.priv_data_size = sizeof(SiprParserContext),
|
||||
.parser_parse = sipr_parse,
|
||||
|
||||
@@ -124,7 +124,7 @@ fail:
|
||||
return buf_size + consumed;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_tak_parser = {
|
||||
const FFCodecParser ff_tak_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_TAK),
|
||||
.priv_data_size = sizeof(TAKParseContext),
|
||||
.parser_parse = tak_parse,
|
||||
|
||||
@@ -272,7 +272,7 @@ static av_cold int vc1_parse_init(AVCodecParserContext *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vc1_parser = {
|
||||
const FFCodecParser ff_vc1_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_VC1),
|
||||
.priv_data_size = sizeof(VC1ParseContext),
|
||||
.parser_init = vc1_parse_init,
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 17
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
#define LIBAVCODEC_VERSION_MINOR 18
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
|
||||
#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
#define FF_API_PARSER_PRIVATE (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
|
||||
// reminder to remove the OMX encoder on next major bump
|
||||
#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63)
|
||||
// reminder to remove Sonic Lossy/Lossless encoders on next major bump
|
||||
|
||||
@@ -336,7 +336,7 @@ static av_cold void vorbis_parser_close(AVCodecParserContext *ctx)
|
||||
av_vorbis_parse_free(&s->vp);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vorbis_parser = {
|
||||
const FFCodecParser ff_vorbis_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_VORBIS),
|
||||
.priv_data_size = sizeof(VorbisParseContext),
|
||||
.parser_parse = vorbis_parse,
|
||||
|
||||
@@ -36,7 +36,7 @@ static int parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vp3_parser = {
|
||||
const FFCodecParser ff_vp3_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3,
|
||||
AV_CODEC_ID_VP6, AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A),
|
||||
.parser_parse = parse,
|
||||
|
||||
@@ -74,7 +74,7 @@ static int parse(AVCodecParserContext *s,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vp8_parser = {
|
||||
const FFCodecParser ff_vp8_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_VP8),
|
||||
.parser_parse = parse,
|
||||
};
|
||||
|
||||
@@ -64,7 +64,7 @@ static int parse(AVCodecParserContext *ctx,
|
||||
return size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vp9_parser = {
|
||||
const FFCodecParser ff_vp9_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_VP9),
|
||||
.parser_parse = parse,
|
||||
};
|
||||
|
||||
@@ -506,7 +506,7 @@ static av_cold void vvc_parser_close(AVCodecParserContext *s)
|
||||
av_freep(&ctx->pc.buffer);
|
||||
}
|
||||
|
||||
const AVCodecParser ff_vvc_parser = {
|
||||
const FFCodecParser ff_vvc_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_VVC),
|
||||
.priv_data_size = sizeof(VVCParserContext),
|
||||
.parser_init = vvc_parser_init,
|
||||
|
||||
@@ -105,7 +105,7 @@ flush:
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_webp_parser = {
|
||||
const FFCodecParser ff_webp_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_WEBP),
|
||||
.priv_data_size = sizeof(WebPParseContext),
|
||||
.parser_parse = webp_parse,
|
||||
|
||||
@@ -101,7 +101,7 @@ static int xbm_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_xbm_parser = {
|
||||
const FFCodecParser ff_xbm_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_XBM),
|
||||
.priv_data_size = sizeof(XBMParseContext),
|
||||
.parser_init = xbm_init,
|
||||
|
||||
@@ -56,7 +56,7 @@ static int xma_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_xma_parser = {
|
||||
const FFCodecParser ff_xma_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_XMA2),
|
||||
.priv_data_size = sizeof(XMAParserContext),
|
||||
.parser_parse = xma_parse,
|
||||
|
||||
@@ -96,7 +96,7 @@ static int xwd_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return next;
|
||||
}
|
||||
|
||||
const AVCodecParser ff_xwd_parser = {
|
||||
const FFCodecParser ff_xwd_parser = {
|
||||
PARSER_CODEC_LIST(AV_CODEC_ID_XWD),
|
||||
.priv_data_size = sizeof(XWDParseContext),
|
||||
.parser_parse = xwd_parse,
|
||||
|
||||
Reference in New Issue
Block a user