Commit Graph

21 Commits

Author SHA1 Message Date
Andreas Rheinhardt aa8c7dc3d8 avformat/argo_cvg: Avoid relocations for ArgoCVGOverride
The average length of the strings used here does not differ much
from the length of the longest string; therefore it makes sense
to use an array big enough for the longest string and not
a pointer to a string. This also moves this array into .rodata
(from .data.rel.ro).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-26 06:36:43 +01:00
Andreas Rheinhardt a24bccc238 avformat/mux: Add flag for "only default codecs allowed"
AVOutputFormat has default codecs for audio, video and subtitle
and often these are the only codecs of this type allowed.
So add a flag to AVOutputFormat so that this can be checked generically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-22 23:57:19 +01:00
Andreas Rheinhardt f4167842c1 avformat/mux: Add flag for "not more than one stream of each type"
More exactly: Not more than one stream of each type for which
a default codec (i.e. AVOutputFormat.(audio|video|subtitle)_codec)
is set; for those types for which no such codec is set (or for
which no designated default codec in AVOutputFormat exists at all)
no streams are permitted.

Given that with this flag set the default codecs become more important,
they are now set explicitly to AV_CODEC_ID_NONE for "unset";
the earlier code relied on AV_CODEC_ID_NONE being equal to zero,
so that default static initialization set it accordingly;
but this is not how one is supposed to use an enum.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-22 23:57:19 +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
Anton Khirnov 08bebeb1be Revert "all: Don't set AVClass.item_name to its default value"
Some callers assume that item_name is always set, so this may be
considered an API break.

This reverts commit 0c6203c97a.
2024-01-20 10:34:48 +01:00
Andreas Rheinhardt 0c6203c97a all: Don't set AVClass.item_name to its default value
Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9;
also avoids relocations.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-12-22 15:12:33 +01:00
Andreas Rheinhardt 59c9dc82f4 avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f9727018 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt cdd50223a6 avformat/argo_cvg: Mark overrides as const
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:08:00 +02:00
Zane van Iperen 8adbecc88e
avformat/argo_cvg: expose loop/reverb/checksum via metadata
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-07-24 19:24:00 +10:00
Zane van Iperen 9054a99fea
avformat/argo_cvg: remove trace logging
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-07-24 19:23:57 +10:00
Zane van Iperen 23f0c55ff8
avformat/argo_cvg: add -loop and -reverb options
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-07-24 19:23:54 +10:00
Zane van Iperen 4dfa8341e0
avformat/argo_cvg: name unk{1,2} fields correctly
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-07-24 19:23:18 +10:00
Martin Storsjö a78f136f3f configure: Use a separate config_components.h header for $ALL_COMPONENTS
This avoids unnecessary rebuilds of most source files if only the
list of enabled components has changed, but not the other properties
of the build, set in config.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-16 14:12:49 +02:00
Anton Khirnov 521cca1333 argo: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:30 -03:00
Michael Niedermayer 70a1024290 avformat/argo_cvg:: Fix order of operations in error check in argo_cvg_write_trailer()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-25 22:23:03 +01:00
Michael Niedermayer 2db9ffb88b avformat/argo_cvg: Fix checksum
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-15 21:36:08 +01:00
Andreas Rheinhardt fd101c9c3b avformat/internal: Move ff_read_line_to_bprint_overwrite to avio_internal.h
It only uses an AVIOContext and an AVBPrint.

When doing so, it turned out that several non-users of
ff_read_line_to_bprint_overwrite() and ff_bprint_to_codecpar_extradata()
relied on libavformat/internal.h to include bprint.h or avstring.h
for them. In order to avoid a repeat of this and in order to reduce
unnecessary dependencies, a forward declaration of struct AVBPrint is
used instead of including bprint.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-29 22:02:05 +02:00
Andreas Rheinhardt 1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
Zane van Iperen 9f502d8c8d
avformat/argo_cvg: don't set bits_per_raw_sample
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-07-19 10:47:18 +10:00
Zane van Iperen dcb285d2b7
avformat: add Argonaut Games CVG muxer
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-12 20:27:02 +10:00
Zane van Iperen 9789ea59d0
avformat: add Argonaut Games CVG demuxer
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-12 20:25:50 +10:00