Commit Graph

106990 Commits

Author SHA1 Message Date
Andreas Rheinhardt 467f157fc6 avformat/utils: Move ff_format_io_close.* to options.c, avformat.c
These are not pure avio-functions, but auxiliary AVFormatContext
functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:19 +02:00
Andreas Rheinhardt 6aca6146d9 avformat/utils: Move ff_stream_side_data_copy to avformat.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:18 +02:00
Andreas Rheinhardt 60fa58b835 avformat/utils: Move avpriv_set_pts_info() to avformat.c
It is an essential auxiliary function for both demuxing and muxing.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:16 +02:00
Andreas Rheinhardt fc2fc98c75 avformat/utils: Move ff_copy_whiteblacklists to avformat.c
This is an auxiliary function for AVFormatContexts.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:15 +02:00
Andreas Rheinhardt fd8a6f78c5 avformat/utils: Move ff_format_set_url to avformat.c
An auxiliary function for AVFormatContexts (mainly muxers,
but potentially (e.g. rtsp) also demuxers).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:10 +02:00
Andreas Rheinhardt 2831fa7aed avformat/utils: Move ff_is_intra_only to avformat.c
It is an auxiliary function only used by the generic
muxing and demuxing code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:09 +02:00
Andreas Rheinhardt 9825d488d6 avformat/utils: Move ff_find_stream_index to demux_utils.c
It is only used by demuxers (and it is generally demuxers
who have to translate format-specific IDs to stream indices).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:49:01 +02:00
Andreas Rheinhardt 493356cc0b avformat/asf: Move ASF GUIDs to a new file
They are also needed by the MMSH and MMST protocols and therefore
the file they are in is pulled in when these protocols are enabled
and used. By moving them to a separate file, linking statically to
libavformat while only using AVIO no longer pulls in all the
muxers/demuxers (and also no longer any AVCodecs when linking
statically to libavcodec).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:57 +02:00
Andreas Rheinhardt 8e2f48ff78 avformat/utils: Move av_find_best_stream to avformat.c
It is not forbidden to call this with a muxer, so it is moved to
avformat.c and not demux_utils.c. ff_find_decoder(), which is used
by av_find_best_stream() is also moved as well, despite being even
more geared towards demuxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:56 +02:00
Andreas Rheinhardt e00d0ef46d avformat/utils: Move av_find_default_stream_index to avformat.c
While it is clearly written with demuxers in mind,
it is not forbidden to call it with muxers, hence avformat.c
and not demux_utils.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:56 +02:00
Andreas Rheinhardt 1c0912c26e avformat/utils: Move av_find_program_from_stream to avformat.c
It is potentially used with both demuxers and muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:55 +02:00
Andreas Rheinhardt 9163faecd3 avformat/utils: Move guessing frame rate/SAR to avformat.c
It is not explicitly forbidden to call these functions with muxers
(although it is probably intended to be only called by demuxers;
av_guess_sample_aspect_ratio even says that "the stream aspect ratio
is set by the demuxer").

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:54 +02:00
Andreas Rheinhardt 682d42b41d avformat/utils: Move matching stream specificiers to avformat.c
It is not to call this with a muxer, so move it to avformat.c
and not demux_utils.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:54 +02:00
Andreas Rheinhardt 217f2bfb49 avformat/utils: Move internal stream timebase stuff to avformat.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:53 +02:00
Andreas Rheinhardt b516302cfe avformat/utils: Move adding AVProgram to avformat.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:52 +02:00
Andreas Rheinhardt 21f3dc0ad6 avformat/utils: Move av_stream_*_side_data API to avformat.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:51 +02:00
Andreas Rheinhardt 703318b350 avformat/utils: Move freeing AVFormatContext to a new file avformat.c
This file will contain the AVFormatContext-specific parts
that are used by both demuxers and muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:49 +02:00
Andreas Rheinhardt a085cfa654 avformat/utils: Move ff_get_extradata to demux_utils.c
It is only used by demuxers (although it is hypothetically
possible that some day e.g. a protocol might need it, but
that is unlikely given that they don't deal with AVCodecParameters).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:45:58 +02:00
Andreas Rheinhardt aef16886dd avformat/internal: Make AVFormatContext* a logctx in ff_get_extradata
I.e. use void* instead of AVFormatContext*, because it is only used
for logging.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:43:26 +02:00
Andreas Rheinhardt 7803825cfc avformat/utils: Move ff_generate_avci_extradata to demux_utils.c
Only used by demuxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:43:25 +02:00
Andreas Rheinhardt 0b0dfb765d avformat/utils: Move av_read_(play|pause) to demux_utils.c
These functions are for demuxers only.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:43:24 +02:00
Andreas Rheinhardt f104352b91 avformat/utils: Move ff_add_param_change to demux_utils.c
Only demuxers have a need to add side-data to a packet.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:46 +02:00
Andreas Rheinhardt 92a43ad384 avformat/utils: Move ff_add_attached_pic to demux_utils.c
It is demuxer-only: It potentially adds an AVStream and it sets
AVStream.attached_pic.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:22 +02:00
Andreas Rheinhardt 3c3c13e67b avformat/utils: Move avformat_queue_attached_pictures to demux_utils.c
AVStream.attached_pic is only used for demuxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:21 +02:00
Andreas Rheinhardt d2da1dc443 avformat/utils: Move av_format_inject_global_side_data to demux_utils.c
This function is only intended for demuxers (as calling it doesn't
have any observable effect for a muxer).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:19 +02:00
Andreas Rheinhardt ff0e8e14c3 avformat/utils: Move avpriv_new_chapter to demux_utils.c
It is demuxer-only: Muxers deal only with chapters given to them;
they don't create any of their own.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:07 +02:00
Andreas Rheinhardt 8550a05ece avdevice/v4l2*: Improve included headers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:38:01 +02:00
Andreas Rheinhardt 284313c664 avformat/utils: Move parser functions to a new file, demux_utils.c
This file is both for the various public APIs that are demuxer-only
as well as for the demuxer-only internal functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:37:50 +02:00
Andreas Rheinhardt 3cfae9e038 avformat/internal: Move definition of FFStream->info to demux.h
It is only used by avformat_find_stream_info().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:37:43 +02:00
Andreas Rheinhardt 35ec5c819b avformat/demux: Add new demux.h header
And move those stuff already in demuxer-only files to it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:37:38 +02:00
Andreas Rheinhardt 20ca491664 avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.c
Only used by muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:32:16 +02:00
Andreas Rheinhardt 08c14e67bb avformat/utils: Move av_stream_get_end_pts() to mux_utils.c
It is only to be used with muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:32:13 +02:00
Andreas Rheinhardt d4455d37c4 avformat/utils: Move avformat_query_codec() to mux_utils.c
It is obviously muxer-only.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:32:10 +02:00
Andreas Rheinhardt 437484a66a avformat/utils: Move ff_format_output_open() to mux_utils.c
It is obviously a muxing-only function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:31:47 +02:00
Andreas Rheinhardt d78838414b avformat/utils: Move creation-time functions to mux_utils
Only used by muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:30:31 +02:00
Andreas Rheinhardt 533836b8e0 avformat/utils: Move ff_get_packet_palette() to rawutils.c
ff_get_packet_palette() and ff_reshuffle_raw_rgb() belong together:
E.g. the former takes the return value of the latter as argument.
So move ff_get_packet_palette() to rawutils.c (which consists solely
of ff_reshuffle_raw_rgb()).
Also add a separate header for these two functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:29:32 +02:00
Andreas Rheinhardt ba49acf143 avformat/mux_utils: Move ff_format_shift_data to new file for mux utils
It is only used by muxers. Given that it is not part of
the core muxing code and given that mux.c is already big enough,
it is moved to a new file for utility functions for muxing.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:29:15 +02:00
Andreas Rheinhardt b9f6d416ec avformat/utils: Move stream_options, avformat_new_stream to options.c
This is the appropriate place given that AVStream is about to
become an AVOpt-enabled struct.
Also move av_disposition_(to|from)_string, as these are tied
to the disposition stream option.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:28:54 +02:00
Andreas Rheinhardt 7547f13548 avformat/utils: Move ff_stream_add_bitstream_filter to mux.c
It is muxing-only; in fact, it should be considered part of
the core muxing code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:27:36 +02:00
Andreas Rheinhardt 5130bbb7ef avformat/mux: Move ff_choose_chroma_location to mxfenc, its only user
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:27:26 +02:00
Andreas Rheinhardt 107bdd97a9 avformat/mux: Move ff_choose_timebase to nutenc, its only user
(This function does not seem to abide by its documentation.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:27:09 +02:00
Andreas Rheinhardt f4a2d722aa avformat/internal: Move muxing-only functions to new mux.h header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:27:01 +02:00
Andreas Rheinhardt 84091cd029 avformat/utils: Use av_realloc_array for reallocating array
Also improve the size check a bit; given that av_realloc_array()
checks for overflow itself, we only have to check for
nb_side_data + 1 still being representable in an int.
But given that we can check for representability in size_t
at no additional cost we do so as it leads to a nicer error code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 06:49:32 +02:00
Andreas Rheinhardt f2b79c5b85 lib*/version: Move library version functions into files of their own
This avoids having to rebuild big files every time FFMPEG_VERSION
changes (which it does with every commit).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 06:49:32 +02:00
Andreas Rheinhardt 3417379d5e avformat/dhav: Don't truncate return value of avio_skip()
Fixes demuxing files bigger than INT_MAX.

Reported-by: jenster
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 06:17:39 +02:00
Marton Balint 0a58fdfd3e avformat/mov: fix timecode with rounded down tmcd nb_frames
Regression since 8dd5bb7280.
Fixes ticket #5978.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-05-09 22:21:59 +02:00
Paul B Mahol 5ccd8f492b avfilter/af_crossfeed: add option for linear phase filtering
But at expense of additional delay.
2022-05-09 22:21:40 +02:00
Paul B Mahol 1309867022 avfilter/af_biquads: add option for block based linear phase processing 2022-05-09 22:21:40 +02:00
Paul B Mahol fe57904a71 avfilter/af_afftdn: request new frames only when needed 2022-05-09 22:21:39 +02:00
Paul B Mahol 36c274057a avfilter/avf_ahistogram: request new frames only when needed 2022-05-09 22:21:39 +02:00