summaryrefslogtreecommitdiffstats
path: root/libavformat/mux_utils.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/dict: Unavpriv avpriv_dict_set_timestamp()Andreas Rheinhardt2025-03-281-2/+1
| | | | | | | And move it to lavf, its only user. Signed-off-by: Andreas Rheinhardt <[email protected]> Signed-off-by: James Almer <[email protected]>
* avformat/mux: Add flag for "only default codecs allowed"Andreas Rheinhardt2024-03-221-0/+2
| | | | | | | | 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 <[email protected]>
* avformat/mux: Add flag for "not more than one stream of each type"Andreas Rheinhardt2024-03-221-0/+19
| | | | | | | | | | | | | | | | 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 <[email protected]>
* avformat/mux_utils: Don't report that AV_CODEC_ID_NONE can be muxedAndreas Rheinhardt2024-03-221-3/+4
| | | | | | | | If AVOutputFormat.video_codec, audio_codec or subtitle_codec is AV_CODEC_ID_NONE, it means that there is no default codec for this format and not that it is supported to mux AV_CODEC_ID_NONE. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat: remove deprecated FF_API_GET_END_PTSJames Almer2024-03-071-7/+0
| | | | Signed-off-by: James Almer <[email protected]>
* avformat/mux: Don't allocate priv_pts separatelyAndreas Rheinhardt2024-02-071-4/+1
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/avformat: Move AVOutputFormat internals out of public headerAndreas Rheinhardt2023-02-091-2/+2
| | | | | | | | | | | | | | This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 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 <[email protected]> Signed-off-by: Anton Khirnov <[email protected]>
* avformat/avformat: Remove AVOutputFormat.data_codecAndreas Rheinhardt2023-02-091-2/+1
| | | | | | | No AVOutputFormat has this set. Signed-off-by: Andreas Rheinhardt <[email protected]> Signed-off-by: Anton Khirnov <[email protected]>
* avutil/dict: Move avpriv_dict_set_timestamp() to a header of its ownAndreas Rheinhardt2022-09-031-0/+1
| | | | | | | It is used almost nowhere, so it needn't be auto-included almost everywhere. Signed-off-by: Andreas Rheinhardt <[email protected]>
* lavf: deprecate av_stream_get_end_pts()Anton Khirnov2022-08-221-0/+2
| | | | | | | | | | | According to its documentation it returns "pts of the last muxed packet + its duration", but the value it actually returns right now is (possibly guessed) dts after muxer-internal bitstream filtering (if any). This function was added for ffmpeg.c, but it is not used there anymore. Since the value it returns is ill-defined and so inappropriate for any serious use, deprecate it.
* avformat: refactor ff_stream_encode_params_copy() to stream_params_copy()Pierre-Anthony Lemieux2022-08-121-28/+0
| | | | | | Addresses http://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/299726.html Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.cAndreas Rheinhardt2022-05-101-0/+28
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/utils: Move av_stream_get_end_pts() to mux_utils.cAndreas Rheinhardt2022-05-101-0/+8
| | | | | | It is only to be used with muxers. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/utils: Move avformat_query_codec() to mux_utils.cAndreas Rheinhardt2022-05-101-0/+18
| | | | | | It is obviously muxer-only. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/utils: Move ff_format_output_open() to mux_utils.cAndreas Rheinhardt2022-05-101-0/+10
| | | | | | It is obviously a muxing-only function. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/utils: Move creation-time functions to mux_utilsAndreas Rheinhardt2022-05-101-0/+31
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/mux_utils: Move ff_format_shift_data to new file for mux utilsAndreas Rheinhardt2022-05-101-0/+81
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 <[email protected]>