aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/fate/ffprobe_xml
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2023-10-13 02:06:21 +0200
committerStefano Sabatini <stefasab@gmail.com>2023-10-20 18:42:01 +0200
commit2b0973dedb257f971d29d64dbf8b89cdb47442c9 (patch)
tree50be6952c57f2f1c73bbf1c8829c0d6f19abe61a /tests/ref/fate/ffprobe_xml
parent79c568dd4e0066bc62c1ae6fbbc70fdb1a088dea (diff)
downloadffmpeg-2b0973dedb257f971d29d64dbf8b89cdb47442c9.tar.gz
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
Diffstat (limited to 'tests/ref/fate/ffprobe_xml')
-rw-r--r--tests/ref/fate/ffprobe_xml26
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/ref/fate/ffprobe_xml b/tests/ref/fate/ffprobe_xml
index 4e893edaa9..42abb08ea4 100644
--- a/tests/ref/fate/ffprobe_xml
+++ b/tests/ref/fate/ffprobe_xml
@@ -34,24 +34,32 @@
<streams>
<stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_tag_string="PSD[16]" codec_tag="0x10445350" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" initial_padding="0" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" bit_rate="705600" nb_read_frames="6" nb_read_packets="6">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
- <tag key="E" value="mc²"/>
- <tag key="encoder" value="Lavc pcm_s16le"/>
+ <tags>
+ <tag key="E" value="mc²"/>
+ <tag key="encoder" value="Lavc pcm_s16le"/>
+ </tags>
</stream>
<stream index="1" codec_name="rawvideo" codec_type="video" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" coded_width="320" coded_height="240" closed_captions="0" film_grain="0" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" refs="1" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" nb_read_frames="4" nb_read_packets="4">
<disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
- <tag key="title" value="foobar"/>
- <tag key="duration_ts" value="field-and-tags-conflict-attempt"/>
- <tag key="encoder" value="Lavc rawvideo"/>
+ <tags>
+ <tag key="title" value="foobar"/>
+ <tag key="duration_ts" value="field-and-tags-conflict-attempt"/>
+ <tag key="encoder" value="Lavc rawvideo"/>
+ </tags>
</stream>
<stream index="2" codec_name="rawvideo" codec_type="video" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="100" height="100" coded_width="100" coded_height="100" closed_captions="0" film_grain="0" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" refs="1" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" nb_read_frames="4" nb_read_packets="4">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
- <tag key="encoder" value="Lavc rawvideo"/>
+ <tags>
+ <tag key="encoder" value="Lavc rawvideo"/>
+ </tags>
</stream>
</streams>
<format filename="tests/data/ffprobe-test.nut" nb_streams="3" nb_programs="0" format_name="nut" start_time="0.000000" duration="0.120000" size="1053646" bit_rate="70243066" probe_score="100">
- <tag key="title" value="ffprobe test file"/>
- <tag key="comment" value="'A comment with CSV, XML &amp; JSON special chars': &lt;tag value=&quot;x&quot;&gt;"/>
- <tag key="comment2" value="I ♥ Üñîçød€"/>
+ <tags>
+ <tag key="title" value="ffprobe test file"/>
+ <tag key="comment" value="'A comment with CSV, XML &amp; JSON special chars': &lt;tag value=&quot;x&quot;&gt;"/>
+ <tag key="comment2" value="I ♥ Üñîçød€"/>
+ </tags>
</format>
</ffprobe>