[FFmpeg-cvslog] ffprobe: fix XML rendering, review XML layout

Stefano Sabatini git at videolan.org
Fri Oct 20 19:45:40 EEST 2023


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Oct 13 02:06:21 2023 +0200| [2b0973dedb257f971d29d64dbf8b89cdb47442c9] | committer: Stefano Sabatini

ffprobe: fix XML rendering, review XML layout

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b0973dedb257f971d29d64dbf8b89cdb47442c9
---

 Changelog                            |    2 +
 doc/ffprobe.xsd                      |   31 +-
 fftools/ffprobe.c                    |   51 +-
 tests/ref/fate/ffprobe_xml           |   26 +-
 tests/ref/fate/ffprobe_xsd           |   26 +-
 tests/ref/fate/flv-demux             |    4 +-
 tests/ref/fate/gapless-mp3-side-data |    6 +-
 tests/ref/fate/mov-aac-2048-priming  |    2 +-
 tests/ref/fate/mov-zombie            |  132 ++---
 tests/ref/fate/oggopus-demux         |    4 +-
 tests/ref/fate/ts-demux              |   38 +-
 tests/ref/fate/ts-opus-demux         | 1024 +++++++++++++++++-----------------
 tests/ref/fate/ts-small-demux        |  146 ++---
 tests/ref/fate/ts-timed-id3-demux    |    4 +-
 14 files changed, 776 insertions(+), 720 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commitdiff;h=2b0973dedb257f971d29d64dbf8b89cdb47442c9


More information about the ffmpeg-cvslog mailing list