summaryrefslogtreecommitdiff
path: root/fftools/ffprobe.c
Commit message (Collapse)AuthorAge
* fftools/ffprobe: Use int64_t instead of long long intAndreas Rheinhardt2024-02-25
| | | | | | This makes ffprobe match the rest of the codebase. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Simplify printing xml valuesAndreas Rheinhardt2024-02-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Constify printing section headerAndreas Rheinhardt2024-02-25
| | | | | | Allows to avoid casting const away. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Don't cast const away needlesslyAndreas Rheinhardt2024-02-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: add ambient viewing environment packet side data.Damiano Galassi2024-02-04
|
* fftools/cmdutils: drop alt_flags parameter from show_help_options()Anton Khirnov2024-01-20
| | | | | No user sets it to more than one flag, so it is redundant with req_flags.
* fftools/ffprobe: make option strings dynamically allocatedAnton Khirnov2024-01-20
| | | | | Do not store the supplied arg pointer directly. While that is valid for now, arg will become ephemeral in the future commits.
* fftools/cmdutils: rename HAS_ARG to OPT_FUNC_ARGAnton Khirnov2023-12-22
| | | | | For consistent namespacing with other option flags. Also, document and enforce that it can only be set for func-type options.
* fftools: split off option types from other flagsAnton Khirnov2023-12-22
| | | | | These values are not actually flags, as only one of them can be meaningfully set.
* fftools/cmdutils: simplify handling of the HAS_ARG option flagAnton Khirnov2023-12-22
| | | | | | | | | | This option flag only carries nontrivial information for options that call a function, in all other cases its presence can be inferred from the option type (bool options do not have arguments, all other types do) and is thus nothing but useless clutter. Change the option parsing code to infer its value when it can, and drop the flag from options where it's not needed.
* ffprobe: print the non-diegetic stream disposition flagJames Almer2023-10-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffprobe: add -output_format as an alias of -ofStefano Sabatini2023-10-20
| | | | | Currently we have -of and -print_format, which is a bit confusing. Add -output_format as an alias of -of to match the short name.
* ffprobe: factorize xml_print_str and xml_print_intStefano Sabatini2023-10-20
| | | | Introduce xml_print_value to avoid logic duplication.
* ffprobe: reindent after 2b0973dStefano Sabatini2023-10-20
|
* ffprobe: fix XML rendering, review XML layoutStefano Sabatini2023-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rendering of int values within a side data element, which was broken since commit d2d3a83ad93, where the side data element was correctly marked as a variable fields element. Logic to render a string variable was implemented already, but it was not implemented for the int fields path, which was enabled by that commit. Also, code and schema is changed in order to account for multiple variable-fields elements - such as side data, contained within the same parent. Previously it was assumed that a single variable-fields element was contained within the parent, which was the case for tags, but is not the case for side-data. Previously data was rendered as: <side_data_list> <side_data side_data_type="CPB properties" max_bitrate="0" min_bitrate="0" avg_bitrate="0" buffer_size="327680" vbv_delay="-1"/> </side_data_list> Now as: <side_data_list> <side_data type="CPB properties"> <side_datum key="side_data_type" value="CPB properties"/> <side_datum key="max_bitrate" value="0"/> <side_datum key="min_bitrate" value="0"/> <side_datum key="avg_bitrate" value="0"/> <side_datum key="buffer_size" value="49152"/> <side_datum key="vbv_delay" value="-1"/> </side_data> </side_data_list> Variable-fields elements are rendered as a containing element wrapping generic key/values elements, enabling use of strict XML schema. Fix trac issue: https://trac.ffmpeg.org/ticket/10613
* fftools/ffprobe: stop using AVStream.side_dataJames Almer2023-10-06
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffprobe: introduce section type, use for the compact outputStefano Sabatini2023-10-06
| | | | | | | | | Also, avoid spurious end-of-line after side data entries, and improve rendering of compact output, by adding an indication of the side data type for each entry. Also fixes issue: http://trac.ffmpeg.org/ticket/9266
* ffprobe: correct section name for side data pieceStefano Sabatini2023-10-06
|
* ffprobe: factorize side data printing to dedicated functionStefano Sabatini2023-10-06
|
* avcodec/defs: Add AV_PROFILE_* defines, deprecate FF_PROFILE_* definesAndreas Rheinhardt2023-09-07
| | | | | | | | | These defines are also used in other contexts than just AVCodecContext ones, e.g. in libavformat. Furthermore, given that these defines are public, the AV-prefix is the right one, so deprecate (and not just move) the FF-macros. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Use proper enum typeAndreas Rheinhardt2023-08-08
| | | | | | | | | This is a bit cleaner as int need not be the underlying type of an enum if a smaller type can hold all its values. Also declare the children_ids array as const as it never changes. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Fix memleakAndreas Rheinhardt2023-08-01
| | | | | | | | Fixes Coverity issue #1524491. Regression since e6126abc6997058ca49ee596b70611bbe367163e. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: fix handling parse_options() return valueAnton Khirnov2023-07-28
| | | | | | Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: stop calling exit_program()Anton Khirnov2023-07-20
| | | | | Inline the relevant part of ffprobe_cleanup() into main() and drop the rest.
* fftools/ffprobe: inline opt_output_file() into its only callerAnton Khirnov2023-07-20
| | | | | | There is no reason to keep them separate. Also, replace exit_program() with returning an error code.
* fftools/ffprobe: replace report_and_exit() with returning error codesAnton Khirnov2023-07-20
|
* fftools/cmdutils: return AVERROR_EXIT for OPT_EXIT options instead of aborting()Anton Khirnov2023-07-20
|
* fftools/cmdutils: add error handling to filter_codec_opts()Anton Khirnov2023-07-20
|
* fftools: handle errors in parse_options()Anton Khirnov2023-07-20
|
* fftools: return errors from parse_number_or_die() instead of abortingAnton Khirnov2023-07-20
| | | | Rename the function to just parse_number().
* fftools/cmdutils: return error codes from setup_find_stream_info_opts() ↵Anton Khirnov2023-07-20
| | | | instead of aborting
* fftools/ffprobe: print exported stream AVOptionsJames Almer2023-05-08
| | | | | | | Similar to the decoder AVOptions, this is useful to show values from options exported by the demuxer. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: use the new AVFrame keyframe flagJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: use the new AVFrame interlace flagsJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: fix printing AVFrame.crop_rightJames Almer2023-04-21
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: print crop_* frame fieldsJames Almer2023-03-26
| | | | | Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: add support for HDR10+ packet side dataJames Almer2023-03-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: stop using AVFrame.pkt_{pos,size}Anton Khirnov2023-03-20
| | | | | | | | | | | | | | | | | | | These fields are ad-hoc and will be deprecated. Use the recently-added AV_CODEC_FLAG_COPY_OPAQUE to pass arbitrary user data from packets to frames. Changes the result of the flcl1905 test, which uses ffprobe to decode wmav2 with multiple frames per packet. Such packets are handled internally by calling the decoder's decode callback multiple times, offsetting the internal packet's data pointer and decreasing its size after each call. The output pkt_size value before this commit is then the remaining internal packet size at the time of each internal decode call. After this commit, output pkt_size is simply the size of the full packet submitted by the caller to the decoder. This is more correct, since internal packets are never seen by the caller and should have no observable outside effects.
* fftools/ffprobe: fix print_dynamic_hdr_vividZhao Zhili2023-03-17
| | | | | | | Don't print tone_mapping_param_num if tone_mapping_mode_flag is disabled. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fftools/ffprobe: fix HDR vivid infoZhao Zhili2023-03-17
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_numberMarton Balint2023-02-13
| | | | | | | | Their usefulness is questionable, very few decoders set them, and their type should have been int64_t. A replacement field can be added later if a valid use case is found. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/version: postpone the remaining API deprecationsJames Almer2023-02-09
| | | | | | They are too recent. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*Andreas Rheinhardt2023-02-09
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffprobe: report the corrupt flag on packetsrcombs2023-02-09
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffprobe: fix data hash renderingStefano Sabatini2023-01-24
| | | | | | | | Print data hash before side data list, fix wrong nesting level of data hash element. In particular, fix trac issue: http://trac.ffmpeg.org/ticket/7217
* ffprobe: use pkt->dts to compute interval ts when pts is missingStefano Sabatini2023-01-24
| | | | | | | | For some samples the pkt->pts is always missing, use the pkt->dts instead. Fix trac issue: http://trac.ffmpeg.org/ticket/4427
* ffprobe: expose AVAmbientViewingEnvironment side data in AVFramesJan Ekström2023-01-13
|
* fftools/ffprobe: prefer fd over pipe for seek supportZhao Zhili2023-01-11
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fftools: use av_dict_iterateMarvin Scholz2022-12-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: support 2D arrays in print_list_fmt()James Almer2022-11-15
| | | | | | Should fix undefined behavior. Signed-off-by: James Almer <jamrial@gmail.com>