summaryrefslogtreecommitdiff
path: root/libavformat/dump.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/dump: use av_dict_iterateMarvin Scholz2022-12-011-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Don't include avcodec.hAndreas Rheinhardt2022-09-261-1/+2
| | | | | | | | | | | | | | | The general demuxing API uses parsers and decoders. Therefore FFStream contains pointers to AVCodecContexts and AVCodecParserContext and lavf/internal.h includes lavc/avcodec.h. Yet actually only a few files files really use these; and it is best when this number stays small. Therefore this commit uses opaque structs in lavf/internal.h for these contexts and stops including avcodec.h. This also avoids including lavc/codec_desc.h implicitly. All other headers are implicitly included as now (mostly through codec.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/dump: Avoid unnecessary implicit calculation of strlenAndreas Rheinhardt2022-09-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | av_strlcpy() returns the length of the src string to enable the caller to check for truncation. It is currently used in the following way in dump_metadata(): Every metadata value is searched for \b, \n, \v, \f, \r and then the data up to the first of these characters found is copied to a small temporary buffer via av_strlcpy() (but of course not more than fits into said buffer) and then printed; all characters up to the character found earlier are then treated as consumed. But this is bad performance-wise if the while string is big and contains many of these characters, because av_strlcpy() will unnecessarily calculate the length of the whole remaining string. (dump_metadata() actually ignored the return value of av_strlcpy().) Fix this by not copying the data to a temporary buffer at all. Instead just use %.*s to bound the number of characters output. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf: Add non diegetic stream disposition flagVittorio Giovara2022-03-151-0/+2
| | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* lavc: deprecate channel count/layout changing side dataAnton Khirnov2022-03-151-1/+8
| | | | | | | | They are incompatible with the new channel layout scheme and no decoder uses them. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-171-7/+8
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.codec_info_nb_frames to AVStreamInternalJames Almer2021-05-071-1/+1
| | | | | | It's a private field, no reason to have it exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dump: Remove remnants of codec timebaseAndreas Rheinhardt2021-04-301-5/+4
| | | | | | | Fixes Coverity issue #1477414. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: remove deprecated AVStream.codecJames Almer2021-04-271-22/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-271-2/+2
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Switch AVCPBProperties to 64bitsAndreas Rheinhardt2021-04-271-5/+1
| | | | | | | | | | | Announced in 2e8b0446c6798947dac77fee4a06f9c4e8131ab5. Two FATE-tests needed to be updated because the checksums of side data containing an AVCPBProperties struct changed. buffer_size has also been switched to 64bits because it is a bitsize. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* av_dump_format(): reduce indentation for streamsAnton Khirnov2021-02-031-1/+1
| | | | | Makes it easier to identify where metadata/chapters end and streams begin.
* av_dump_format(): increase indentation for chapter metadataAnton Khirnov2021-02-031-1/+1
| | | | It should be at a deeper level than the chapter it belongs to.
* av_dump_format: add a heading for chaptersAnton Khirnov2021-02-031-0/+2
| | | | Otherwise the chapters look like a part of the metadata section.
* avformat: use av_timecode_make_smpte_tc_string2Marton Balint2020-09-131-3/+3
| | | | | | WSD format has no frames stored for playback time. Signed-off-by: Marton Balint <cus@passwd.hu>
* API: add AV_PKT_DATA_S12M_TIMECODE to AVPacketSideDataTypeLimin Wang2020-07-151-0/+21
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dump: add a \n for end of ERROR logLimin Wang2020-07-021-6/+6
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dump: Use intermediate pointer for access to programs arrayAndreas Rheinhardt2020-06-301-7/+8
| | | | | | | Improves readability. Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dump: Use const where appropriateAndreas Rheinhardt2020-06-301-43/+48
| | | | | | | | Also switch to using a pointer to access stream side data instead of copying the stream's AVPacketSideData. Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/dump: schedule use of deprecated API for removalAnton Khirnov2020-06-101-0/+14
|
* avformat/dump: Use int64_t for intermediate time valuesDerek Buitenhuis2020-05-171-2/+2
| | | | | | | | | | | | | | Prevents wrap-around to negative values while calculating the duration string. Before: Duration: -411422:-59:-42.17, start: 0.000000, bitrate: 0 kb/s After: Duration: 781623:28:34.17, start: 0.000000, bitrate: 0 kb/s Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavf/dump: dump DOVI side dataJun Zhao2020-04-231-0/+19
| | | | | | dump DOVI side data. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* API: add AV_PKT_DATA_ICC_PROFILE to AVPacketSideDataTypevectronic2020-03-101-0/+3
| | | | Signed-off-by: vectronic <hello.vectronic@gmail.com>
* lavf/dump: dump the vbv_delay with N/A instead of 18446744073709551615Limin Wang2019-08-281-4/+7
| | | | | | | | | | | | | | | | How to check it: ./ffmpeg -f lavfi -i testsrc -c:v mpeg2video -f null - master: Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: 18446744073709551615 patch applied: Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/dump: use error log level for invalid sizeLimin Wang2019-08-181-6/+6
| | | | | Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* lavf/dump: Fix cpb bitrate type after next major bump.Carl Eugen Hoyos2019-08-101-0/+4
|
* lavf/dump: Fix vbv_delay type specifier.Carl Eugen Hoyos2019-08-101-1/+1
| | | | Spotted-by: James Almer
* lavf/dump: More disposition flag dumpJun Zhao2019-07-031-0/+8
| | | | | | | More disposition flag dump Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/dump: Fix a typo: comentary -> commentary.Carl Eugen Hoyos2018-10-191-1/+1
| | | | Fixes ticket #7499.
* avformat/mpegts: tag video streams with still imagesAman Gupta2018-05-171-0/+2
| | | | | | | | | | | | Parses the video_stream_descriptor (H.222 2.6.2) to look for the still_picture_flag. This is exposed to the user via a new AV_DISPOSITION_STILL_IMAGE. See for example https://tmm1.s3.amazonaws.com/music-choice.ts, whose video stream only updates every ~6 seconds. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegts: set AV_DISPOSITION_DEPENDENT for mix_type=0 supplementary audioAman Gupta2018-02-231-0/+2
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avformat/dump: tag AV_DISPOSITION_DESCRIPTIONS streamsAman Gupta2018-02-231-0/+2
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT.Carl Eugen Hoyos2017-12-171-1/+3
|
* lavf/dump: Remove superfluous cast.Carl Eugen Hoyos2017-08-291-1/+1
|
* avformat/dump : Display Content Light Level metadataSteve Lhomme2017-04-061-0/+11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dump: use av_spherical_projection_name() to print spherical ↵James Almer2017-03-311-10/+1
| | | | | | | projection names Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-291-1/+2
|
* spherical: Change types of bounding and pad to uint32_tVittorio Giovara2017-03-171-1/+1
| | | | | | | | | These values are defined to be 32bit in the specification, so it makes more sense to store them as fixed width. Based on a patch by Micahel Niedermayer <michael@niedermayer.cc>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* spherical: Add tiled equirectangular type and projection-specific propertiesVittorio Giovara2017-03-071-2/+13
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Add spherical packet side data APIVittorio Giovara2016-12-071-0/+30
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat/dump: remove line break on mastering display metadata info dumpJames Almer2016-12-051-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'e45a638f50cc1dbeb87b9792e68f57e77fc0c3b5'Hendrik Leppkes2016-06-261-1/+0
|\ | | | | | | | | | | | | * commit 'e45a638f50cc1dbeb87b9792e68f57e77fc0c3b5': dump: Drop unused variable Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dump: Drop unused variableDiego Biurrun2016-05-221-1/+0
| |
* | Merge commit '0c4468dc185fa8b9e7d6add914595c5e928b24fd'Clément Bœsch2016-06-231-29/+2
|\ \ | |/ | | | | | | | | | | * commit '0c4468dc185fa8b9e7d6add914595c5e928b24fd': stereo3d: Add API to get name from value or value from name Merged-by: Clément Bœsch <clement@stupeflix.com>
| * stereo3d: Add API to get name from value or value from nameVittorio Giovara2016-05-171-29/+2
| | | | | | | | Use it in av_dump_format() instead of a huge switch case.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/dump: Show coded dimensions againMichael Niedermayer2016-06-131-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/dump: Print tbc valueMichael Niedermayer2016-06-041-4/+7
| | | | | | | | | | | | | | Fixes regression of av_dump_format() Fixes part of Ticket 5444 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/dump: Use codec and QP limits from AVCodecContextMichael Niedermayer2016-06-031-0/+3
| | | | | | | | | | | | | | Fixes regression Fixes Ticket5421 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>