summaryrefslogtreecommitdiffstats
path: root/libavformat/internal.h
Commit message (Collapse)AuthorAgeFilesLines
* avformat/utils: move mkdir_p to utilsSteven Liu2018-09-251-0/+8
| | | | | | | Because it will be used by avformat/segment.c or other module which need to automatically create sub-directories operation. Signed-off-by: Steven Liu <[email protected]>
* avformat/utils: function to get the formatted ntp timeVishwanath Dixit2018-05-291-0/+8
| | | | | | | This utility function creates 64-bit NTP time format as per the RFC 5905. A simple explaination of 64-bit NTP time format is here http://www.beaglesoft.com/Manual/page53.htm
* lavf/aviobuf: add ff_get_chomp_lineJun Zhao2018-04-121-0/+10
| | | | | | | Same as ff_get_line but strip the white-space characters in the string tail. Signed-off-by: Jun Zhao <[email protected]>
* avformat/utils: make AVPacketList helper functions sharedJames Almer2018-04-041-0/+39
| | | | | | Based on a patch by Luca Barbato. Signed-off-by: James Almer <[email protected]>
* lavf: move avpriv function definition to internal.hJosh de Kock2018-04-021-0/+1
| | | | Signed-off-by: Josh de Kock <[email protected]>
* Revert "lavd: add new API for iterating input and output devices"Josh de Kock2018-03-311-7/+0
| | | | | | | | | | This reverts commit 0fd475704e871ef3a535947596a012894bae3cbd. Revert "lavd: fix iterating of input and output devices" This reverts commit ce1d77a5e7cebce11074bf6f9e38ad6da37338ff. Signed-off-by: Josh de Kock <[email protected]>
* avformat/internal: Document the freeing behavior of ff_alloc_extradata()Michael Niedermayer2018-03-071-0/+2
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/aviobuf: add ff_read_line_to_bprint and ↵Marton Balint2018-02-241-0/+26
| | | | | | | | ff_read_line_to_bprint_overwrite functions To be able to read lines longer than a static buffer size. Signed-off-by: Marton Balint <[email protected]>
* lavd: add new API for iterating input and output devicesJosh de Kock2018-02-061-0/+7
| | | | | This also adds an avpriv function to register devices in libavformat
* avformat: add url field to AVFormatContextMarton Balint2018-01-281-0/+7
| | | | | | | | | This will replace the 1024 character limited filename field. Compatiblity for output contexts are provided by copying filename field to URL if URL is unset and by providing an internal function for muxers to set both url and filename at once. Signed-off-by: Marton Balint <[email protected]>
* avformat/hlsenc, utils: Moved is_http_proto from hlsenc to utils for re-useKarthick Jeyapal2017-12-291-0/+8
| | | | | Reviewed-by: Aman Gupta <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* lavc, lavf: move avformat static mutex from avcodec to avformatwm42017-12-261-0/+4
| | | | | | | | It's completely absurd that libavcodec would care about libavformat locking, but it was there because the lock manager was in libavcodec. This is more stright forward. Changes ABI, but we don't require ABI compatibility currently.
* avformat/internal: fix compile error with some versions of g++Aman Gupta2017-12-231-2/+5
| | | | | | Fixes #6926 Signed-off-by: Aman Gupta <[email protected]>
* avformat/internal: log underlying error with ff_rename failureAman Gupta2017-12-221-1/+1
| | | | | Signed-off-by: Aman Gupta <[email protected]> Signed-off-by: wm4 <[email protected]>
* avformat/mux: stop delaying writing the headerJames Almer2017-12-061-6/+0
| | | | | | | Every bitstream filter behaves as intended now, so there's no need to wait for the first packet of every stream. Signed-off-by: James Almer <[email protected]>
* avformat: move priv_pts from AVStream to an internal structJames Almer2017-11-071-0/+2
| | | | | | | It has no reason to be in a public header, even if defined as private. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* lavf: consider codec framerate for framerate detectionwm42017-06-071-0/+5
| | | | | | | Fixes detection of some TV sample as 24.5 FPS. With the patch applied, it's detected as 25 FPS. This is enabled for mpegts only.
* lavf: use the new bitstream filter for extracting extradataJames Almer2017-04-071-0/+9
| | | | | | | | | | | | | | | | | This merges commits 8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4 and 096a8effa3f8f3455292c958c3ed07e798def7bd by Anton Khirnov, with the following change: - extract_extradata_check() is added to know if the codec is supported by the bsf before trying to initialize it. This behaviour is similar to the old AVCodecParser.split checks. The FATE reference changes are due to the filtered out NAL units that the old AVCodecParser.split implementation left alone. Decoding is unchanged as the functions that parse extradata simply ignored said unnecessary NAL units. Signed-off-by: James Almer <[email protected]>
* Revert "Merge commit '8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4'"James Almer2017-03-231-9/+0
| | | | | | | | This reverts commit 1c193ac1f9cfe703d6a1c36795f309ba5d14bf6e, reversing changes made to 7ebc9f8df4035ecaa84ad4429480986e3e7597ae. Several FATE tests started failing after this merge, so it's reverted until it can be properly fixed.
* Merge commit '8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4'James Almer2017-03-231-0/+9
|\ | | | | | | | | | | | | * commit '8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4': lavf: use the new bitstream filter for extracting extradata Merged-by: James Almer <[email protected]>
| * lavf: use the new bitstream filter for extracting extradataAnton Khirnov2016-10-161-0/+9
| | | | | | | | | | | | | | | | | | This also fixes a minor bug introduced in the codecpar conversion, where the termination condition for extracting the extradata does not match the actual extradata setting code. As a result, the packet durations made up by lavf go back to their values before the codecpar conversion. That is of little consequence since that code should eventually be dropped completely.
* | avformat: Ignore ID3v2 tags if other tags are present e.g. vorbisPaul Arzelier2017-01-281-0/+5
| | | | | | | | | | Reviewed-by: wm4 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05'Hendrik Leppkes2016-11-131-7/+6
|\| | | | | | | | | | | | | * commit '785c25443b56adb6dbbb78d68cccbd9bd4a42e05': movenc: Apply offsets on timestamps when peeking into interleaving queues Merged-by: Hendrik Leppkes <[email protected]>
| * movenc: Apply offsets on timestamps when peeking into interleaving queuesMartin Storsjö2016-06-281-5/+6
| | | | | | | | Signed-off-by: Martin Storsjö <[email protected]>
* | lavf/mux: add avformat_init_outputRodger Combs2016-10-241-0/+10
| | | | | | | | | | | | This allows a consumer to run the muxer's init function without actually writing the header, which is useful in chained muxers that support automatic bitstream filtering.
* | doc: fix spelling errorsAndreas Cadhalpun2016-10-211-1/+1
| | | | | | | | | | | | | | | | Thanks to Mathieu Malaterre <[email protected]> for reporting the Que/Queue typo. (https://bugs.debian.org/839542) Reviewed-by: Lou Logan <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* | avformat/mux: implement AVFMT_FLAG_SHORTESTMichael Niedermayer2016-09-111-0/+5
| | | | | | | | | | | | This will allow fixing several bugs with the -shortest option Signed-off-by: Michael Niedermayer <[email protected]>
* | lavf/utils: add some const to pointers parameters in a few functionsClément Bœsch2016-08-171-1/+1
| |
* | avformat/utils: Add ff_format_output_open() functionJan Sebechlebsky2016-07-161-0/+10
| | | | | | | | | | | | | | | | Add ff_format_output_open utility function to wrap io_open callback of AVFormatContext structure. Signed-off-by: Jan Sebechlebsky <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* | avformat/utils: Add ff_stream_encode_params_copy()Jan Sebechlebsky2016-07-161-0/+9
| | | | | | | | | | Signed-off-by: Jan Sebechlebsky <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* | lavf: update auto-bsf to new BSF APIRodger Combs2016-06-251-2/+3
| |
* | avformat: Fix ff_interleaved_peek()Michael Niedermayer2016-06-251-1/+3
| | | | | | | | | | | | Fixes assertion failures in movenc Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed'Matthieu Bouron2016-06-231-0/+10
|\| | | | | | | | | | | | | * commit 'e1eb0fc960163402bbb4e630185790488f7d28ed': movenc: Use packets in interleaving queues for the duration at the end of fragments Merged-by: Matthieu Bouron <[email protected]>
| * movenc: Use packets in interleaving queues for the duration at the end of ↵Martin Storsjö2016-05-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fragments As long as caller only writes packets using av_interleaved_write_frame with no manual flushing, this should allow us to always have accurate durations at the end of fragments, since there should be at least one queued packet in each stream (except for the stream where the current packet is being written, but if the muxer itself does the cutting of fragments, it also has info about the next packet for that stream). Signed-off-by: Martin Storsjö <[email protected]>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <[email protected]>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <[email protected]>
* | avformat/mux: do not call write_header multiple times if it fails the first timeMarton Balint2016-06-201-0/+1
| | | | | | | | Signed-off-by: Marton Balint <[email protected]>
* | avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-141-1/+1
| | | | | | | | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <[email protected]>
* | avformat/framehash: enable new outputJames Almer2016-04-131-1/+1
| | | | | | | | | | | | | | Also, make every addition except for sidedata part of version 1 instead of the new version 2. Reviewed-by: Michael Niedermayer <[email protected]>
* | avformat/framehash: Add more information to the outputMichael Niedermayer2016-04-121-1/+1
| | | | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-3/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <[email protected]> - Hendrik Leppkes <[email protected]> - wm4 <[email protected]> - Clément Bœsch <[email protected]> - James Almer <[email protected]> - Michael Niedermayer <[email protected]> - Rostislav Pehlivanov <[email protected]> Merged-by: Derek Buitenhuis <[email protected]>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | lavc/utils: Introduce ff_bprint_to_codecpar_extradata for avformatHendrik Leppkes2016-04-031-0/+7
| | | | | | | | | | | | | | | | It will be used by text subtitle demuxers to construct format instructions straight into extradata. They all currently a similar function that accepts an AVCodecContext instead. Signed-off-by: Derek Buitenhuis <[email protected]>
* | avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-041-1/+1
| | | | | | | | Signed-off-by: Derek Buitenhuis <[email protected]>
* | lavf/utils: Normalize AVPacket.data to native endian in ff_get_packet_palette()Mats Peterson2016-03-041-2/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/utils: add a function to standardize creation timeMarton Balint2016-03-031-0/+8
| | | | | | | | | | | | | | | | | | | | This can be used for formats which write all format metadata as string to files, therefore non-standard creation times such as 'now' will be parsed. The standardized creation time is UTC ISO 8601 with microsecond precision. Reviewed-by: wm4 <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* | lavf/utils: Add ff_get_packet_palette()Mats Peterson2016-03-021-0/+12
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/avienc: Store pal8 paletteMichael Niedermayer2016-02-191-1/+6
| | | | | | | | | | | | | | This can be made more efficient, but first and the main goal of this change is to store it at all Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat: add ff_reshuffle_raw_rgb()Michael Niedermayer2016-02-181-0/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/utils: remove ff_iso8601_to_unix_timeMarton Balint2016-02-141-5/+0
| | | | | | | | Signed-off-by: Marton Balint <[email protected]>