Commit Graph

13 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt b800327f4c avformat/avformat: Add FFInputFormat, hide internals of AVInputFormat
This commit does for AVInputFormat what commit
59c9dc82f4 did for AVOutputFormat:
It adds a new type FFInputFormat, moves all the internals
of AVInputFormat to it and adds a now reduced AVInputFormat
as first member.

This does not affect/improve extensibility of both public
or private fields for demuxers (it is still a mess due to lavd).

This is possible since 50f34172e0
(which removed the last usage of an internal field of AVInputFormat
in fftools).

(Hint: tools/probetest.c accesses the internals of FFInputFormat
as well, but given that it is a testing tool this is not considered
a problem.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
James Almer 65ddc74988 avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03: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 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 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 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