1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avformat: remove deprecated FF_API_ALLOW_FLUSH

Deprecated since 2023-10-02.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-02-19 12:43:55 -03:00
parent 3fd10e0cf3
commit c153238275
11 changed files with 2 additions and 99 deletions

View File

@@ -796,11 +796,7 @@ const FFOutputFormat ff_pulse_muxer = {
.get_output_timestamp = pulse_get_output_timestamp,
.get_device_list = pulse_get_device_list,
.control_message = pulse_control_message,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_NOFILE,
#endif
.p.priv_class = &pulse_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};

View File

@@ -485,9 +485,6 @@ typedef struct AVProbeData {
#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */
#if FF_API_ALLOW_FLUSH
#define AVFMT_ALLOW_FLUSH 0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
#endif
#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
increasing timestamps, but they must
still be monotonic */

View File

@@ -717,11 +717,7 @@ const FFOutputFormat ff_fifo_muxer = {
.p.name = "fifo",
.p.long_name = NULL_IF_CONFIG_SMALL("FIFO queue pseudo-muxer"),
.p.priv_class = &fifo_muxer_class,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
#endif
.priv_data_size = sizeof(FifoContext),
.init = fifo_init,
.write_header = fifo_write_header,

View File

@@ -3288,11 +3288,7 @@ const FFOutputFormat ff_hls_muxer = {
.p.audio_codec = AV_CODEC_ID_AAC,
.p.video_codec = AV_CODEC_ID_H264,
.p.subtitle_codec = AV_CODEC_ID_WEBVTT,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_NODIMENSIONS,
#else
.p.flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_NODIMENSIONS,
#endif
.p.priv_class = &hls_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
.priv_data_size = sizeof(HLSContext),

View File

@@ -3601,11 +3601,7 @@ const FFOutputFormat ff_matroska_muxer = {
.write_packet = mkv_write_flush_packet,
.write_trailer = mkv_write_trailer,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
#if FF_API_ALLOW_FLUSH
AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
#else
AVFMT_TS_NONSTRICT,
#endif
.p.codec_tag = (const AVCodecTag* const []){
ff_codec_bmp_tags, ff_codec_wav_tags,
additional_audio_tags, additional_subtitle_tags, 0
@@ -3645,11 +3641,7 @@ const FFOutputFormat ff_webm_muxer = {
.query_codec = webm_query_codec,
.check_bitstream = mkv_check_bitstream,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
#if FF_API_ALLOW_FLUSH
AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
#else
AVFMT_TS_NONSTRICT,
#endif
.p.priv_class = &matroska_webm_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};
@@ -3671,12 +3663,7 @@ const FFOutputFormat ff_matroska_audio_muxer = {
.write_packet = mkv_write_flush_packet,
.write_trailer = mkv_write_trailer,
.check_bitstream = mkv_check_bitstream,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT |
AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT,
#endif
.p.codec_tag = (const AVCodecTag* const []){
ff_codec_wav_tags, additional_audio_tags, 0
},

View File

@@ -8756,11 +8756,7 @@ const FFOutputFormat ff_mov_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS
#if FF_API_ALLOW_FLUSH
| AVFMT_ALLOW_FLUSH
#endif
,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS,
.p.codec_tag = (const AVCodecTag* const []){
ff_codec_movvideo_tags, ff_codec_movaudio_tags, ff_codec_movsubtitle_tags, 0
},
@@ -8782,11 +8778,7 @@ const FFOutputFormat ff_tgp_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
#endif
.p.codec_tag = codec_3gp_tags_list,
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8808,11 +8800,7 @@ const FFOutputFormat ff_mp4_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS
#if FF_API_ALLOW_FLUSH
| AVFMT_ALLOW_FLUSH
#endif
,
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS,
.p.codec_tag = mp4_codec_tags_list,
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8833,11 +8821,7 @@ const FFOutputFormat ff_psp_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
#endif
.p.codec_tag = mp4_codec_tags_list,
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8857,11 +8841,7 @@ const FFOutputFormat ff_tg2_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
#endif
.p.codec_tag = codec_3gp_tags_list,
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8882,11 +8862,7 @@ const FFOutputFormat ff_ipod_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
#endif
.p.codec_tag = (const AVCodecTag* const []){ codec_ipod_tags, 0 },
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8907,11 +8883,7 @@ const FFOutputFormat ff_ismv_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
#endif
.p.codec_tag = (const AVCodecTag* const []){
codec_mp4_tags, codec_ism_tags, 0 },
.check_bitstream = mov_check_bitstream,
@@ -8933,11 +8905,7 @@ const FFOutputFormat ff_f4v_muxer = {
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_GLOBALHEADER,
#endif
.p.codec_tag = (const AVCodecTag* const []){ codec_f4v_tags, 0 },
.check_bitstream = mov_check_bitstream,
.p.priv_class = &mov_isobmff_muxer_class,
@@ -8957,11 +8925,7 @@ const FFOutputFormat ff_avif_muxer = {
.write_packet = mov_write_packet,
.write_trailer = avif_write_trailer,
.deinit = mov_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_GLOBALHEADER,
#endif
.p.codec_tag = codec_avif_tags_list,
.p.priv_class = &mov_avif_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,

View File

@@ -2413,11 +2413,7 @@ const FFOutputFormat ff_mpegts_muxer = {
.write_trailer = mpegts_write_end,
.deinit = mpegts_deinit,
.check_bitstream = mpegts_check_bitstream,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_ALLOW_FLUSH | AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS,
#else
.p.flags = AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS,
#endif
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
.p.priv_class = &mpegts_muxer_class,
};

View File

@@ -773,11 +773,7 @@ const FFOutputFormat ff_ogg_muxer = {
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT,
#endif
.p.priv_class = &ogg_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};
@@ -796,11 +792,7 @@ const FFOutputFormat ff_oga_muxer = {
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_TS_NEGATIVE,
#endif
.p.priv_class = &ogg_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};
@@ -822,11 +814,7 @@ const FFOutputFormat ff_ogv_muxer = {
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT,
#endif
.p.priv_class = &ogg_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};
@@ -845,11 +833,7 @@ const FFOutputFormat ff_spx_muxer = {
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_TS_NEGATIVE,
#endif
.p.priv_class = &ogg_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};
@@ -868,11 +852,7 @@ const FFOutputFormat ff_opus_muxer = {
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.deinit = ogg_free,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_TS_NEGATIVE,
#endif
.p.priv_class = &ogg_muxer_class,
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};

View File

@@ -610,10 +610,6 @@ const FFOutputFormat ff_tee_muxer = {
.write_trailer = tee_write_trailer,
.write_packet = tee_write_packet,
.p.priv_class = &tee_muxer_class,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
#else
.p.flags = AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
#endif
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};

View File

@@ -154,11 +154,7 @@ const FFOutputFormat ff_fifo_test_muxer = {
.write_trailer = fifo_test_trailer,
.deinit = failing_deinit,
.p.priv_class = &failing_muxer_class,
#if FF_API_ALLOW_FLUSH
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
#else
.p.flags = AVFMT_NOFILE,
#endif
.flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
};

View File

@@ -42,7 +42,6 @@
*
*/
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62)
#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
#define FF_API_GET_DUR_ESTIMATE_METHOD (LIBAVFORMAT_VERSION_MAJOR < 62)