summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.hAndreas Rheinhardt2022-05-15
| | | | | | | | | | Move AC3HeaderInfo into ac3_parser_internal.h and the rest into a new header ac3defs.h. This also breaks an include cycle of ac3.h and ac3tab.h (the latter now only needs ac3defs.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/dashdec: accept and relay CENC decryption keyGyan Doshi2022-05-14
| | | | | Allows to process CENC-encrypted media segments. Option arg syntax is same as that for option decryption_key in MOV demuxer
* avformat/movenc: Add support for AVIF muxingVignesh Venkatasubramanian2022-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an AVIF muxer by re-using the existing the mov/mp4 muxer. AVIF Specification: https://aomediacodec.github.io/av1-avif Sample usage for still image: ffmpeg -i image.png -c:v libaom-av1 -still-picture 1 image.avif Sample usage for animated AVIF image: ffmpeg -i video.mp4 animated.avif We can re-use any of the AV1 encoding options that will make sense for image encoding (like bitrate, tiles, encoding speed, etc). The files generated by this muxer has been verified to be valid AVIF files by the following: 1) Displays on Chrome (both still and animated images). 2) Displays on Firefox (only still images, firefox does not support animated AVIF yet). 3) Verified to be valid by Compliance Warden: https://github.com/gpac/ComplianceWarden Fixes the encoder/muxer part of Trac Ticket #7621 Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
* avformat/av1: Add a parameter to av1c to omit seq headerVignesh Venkatasubramanian2022-05-13
| | | | | | | | | Add a parameter to omit seq header when generating the av1C atom. For now, this does not change any behavior. This will be used by a follow-up patch to add AVIF support. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
* avformat/hlsenc: check discont_program_date_time before use it in parse_playlistSteven Liu2022-05-12
| | | | | | | | | | Fix ticket: 9238 In parse_playlist, the discont_program_date_time should be used after EXT-X-PROGRAM-DATE-TIME tag parsed. Tested-by: pero Reviewed-by: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/internal: Hide BSF stuff only used by the core APIsAndreas Rheinhardt2022-05-12
| | | | | | | | | | | | | | | | | | | | | The general demuxing API uses bitstream filters to extract extradata and the muxing API uses them in order to transform packets into the format desired by the target format. Therefore FFStream contains pointers to AVBSFContexts and lavf/internal.h includes lavc/bsf.h. Yet actually, only a few files files are supposed to use these, namely avformat.c, demux.c and mux.c. For all the other files, it should be an opaque type that they should not touch and that they need not know anything about. This can be achieved by not including these headers and using the structs instead of the corresponding typedefs. This also forces translation units that really use the BSF API themselves to include lavc/bsf.h directly instead of relying on indirect inclusions (a few other files also use the BSF API; they already abided by this). Of course, it also avoids unnecessary rebuilds when bsf.h changes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move FFERROR_REDO to demux.hAndreas Rheinhardt2022-05-12
| | | | | | It is demuxer-only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/http: remove unused function ff_http_get_shutdown_statusSteven Liu2022-05-12
| | | | | | ff_http_get_shutdown_status is unused after ticket 9010 fixed. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/matroskaenc: enable PGS merge auto bsfJohn Stebbins2022-05-10
| | | | | | PGS segments must be merged to one packet for muxing to mkv Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_format_io_close.* to options.c, avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | These are not pure avio-functions, but auxiliary AVFormatContext functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_stream_side_data_copy to avformat.cAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move avpriv_set_pts_info() to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | It is an essential auxiliary function for both demuxing and muxing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_copy_whiteblacklists to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | This is an auxiliary function for AVFormatContexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_format_set_url to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | An auxiliary function for AVFormatContexts (mainly muxers, but potentially (e.g. rtsp) also demuxers). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_is_intra_only to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | It is an auxiliary function only used by the generic muxing and demuxing code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_find_stream_index to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/asf: Move ASF GUIDs to a new fileAndreas Rheinhardt2022-05-10
| | | | | | | | | | | 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>
* avformat/utils: Move av_find_best_stream to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | | | 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>
* avformat/utils: Move av_find_default_stream_index to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | | 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>
* avformat/utils: Move av_find_program_from_stream to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | It is potentially used with both demuxers and muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move guessing frame rate/SAR to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | | | 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>
* avformat/utils: Move matching stream specificiers to avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/utils: Move internal stream timebase stuff to avformat.cAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move adding AVProgram to avformat.cAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move av_stream_*_side_data API to avformat.cAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move freeing AVFormatContext to a new file avformat.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/utils: Move ff_get_extradata to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | | 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>
* avformat/internal: Make AVFormatContext* a logctx in ff_get_extradataAndreas Rheinhardt2022-05-10
| | | | | | | I.e. use void* instead of AVFormatContext*, because it is only used for logging. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_generate_avci_extradata to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | Only used by demuxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move av_read_(play|pause) to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | These functions are for demuxers only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_add_param_change to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | Only demuxers have a need to add side-data to a packet. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_add_attached_pic to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | It is demuxer-only: It potentially adds an AVStream and it sets AVStream.attached_pic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move avformat_queue_attached_pictures to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | AVStream.attached_pic is only used for demuxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move av_format_inject_global_side_data to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/utils: Move avpriv_new_chapter to demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/utils: Move parser functions to a new file, demux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/internal: Move definition of FFStream->info to demux.hAndreas Rheinhardt2022-05-10
| | | | | | It is only used by avformat_find_stream_info(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/demux: Add new demux.h headerAndreas Rheinhardt2022-05-10
| | | | | | And move those stuff already in demuxer-only files to it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move av_stream_get_end_pts() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is only to be used with muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move avformat_query_codec() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is obviously muxer-only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_format_output_open() to mux_utils.cAndreas Rheinhardt2022-05-10
| | | | | | It is obviously a muxing-only function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move creation-time functions to mux_utilsAndreas Rheinhardt2022-05-10
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move ff_get_packet_palette() to rawutils.cAndreas Rheinhardt2022-05-10
| | | | | | | | | | 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>
* avformat/mux_utils: Move ff_format_shift_data to new file for mux utilsAndreas Rheinhardt2022-05-10
| | | | | | | | 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>
* avformat/utils: Move stream_options, avformat_new_stream to options.cAndreas Rheinhardt2022-05-10
| | | | | | | | | 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>
* avformat/utils: Move ff_stream_add_bitstream_filter to mux.cAndreas Rheinhardt2022-05-10
| | | | | | | 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>
* avformat/mux: Move ff_choose_chroma_location to mxfenc, its only userAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Move ff_choose_timebase to nutenc, its only userAndreas Rheinhardt2022-05-10
| | | | | | (This function does not seem to abide by its documentation.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move muxing-only functions to new mux.h headerAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>