Browse code

ffprobe: extend disposition printing support

This generalizes the previous work on disposition printing.

Disposition flags are shown in a dedicated section, which should improve
output intellegibility, extensibility and filtering operations.

This breaks output syntax with the recently introduced disposition
printing.

Stefano Sabatini authored on 2012/09/26 19:30:08
Showing 10 changed files
... ...
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release,
2 2
 releases are sorted from youngest to oldest.
3 3
 
4 4
 version next:
5
+- stream disposition information printing in ffprobe
5 6
 
6 7
 
7 8
 version 1.0:
... ...
@@ -86,9 +86,24 @@
86 86
         </xsd:sequence>
87 87
     </xsd:complexType>
88 88
 
89
+    <xsd:complexType name="streamDispositionType">
90
+      <xsd:attribute name="default"          type="xsd:int" use="required" />
91
+      <xsd:attribute name="dub"              type="xsd:int" use="required" />
92
+      <xsd:attribute name="original"         type="xsd:int" use="required" />
93
+      <xsd:attribute name="comment"          type="xsd:int" use="required" />
94
+      <xsd:attribute name="lyrics"           type="xsd:int" use="required" />
95
+      <xsd:attribute name="karaoke"          type="xsd:int" use="required" />
96
+      <xsd:attribute name="forced"           type="xsd:int" use="required" />
97
+      <xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
98
+      <xsd:attribute name="visual_impaired"  type="xsd:int" use="required" />
99
+      <xsd:attribute name="clean_effects"    type="xsd:int" use="required" />
100
+      <xsd:attribute name="attached_pic"     type="xsd:int" use="required" />
101
+    </xsd:complexType>
102
+
89 103
     <xsd:complexType name="streamType">
90 104
       <xsd:sequence>
91 105
         <xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
106
+        <xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
92 107
       </xsd:sequence>
93 108
 
94 109
       <xsd:attribute name="index"            type="xsd:int" use="required"/>
... ...
@@ -100,8 +115,6 @@
100 100
       <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
101 101
       <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
102 102
       <xsd:attribute name="extradata"        type="xsd:string" />
103
-      <xsd:attribute name="default"          type="xsd:int" use="required"/>
104
-      <xsd:attribute name="forced"           type="xsd:int" use="required"/>
105 103
 
106 104
       <!-- video attributes -->
107 105
       <xsd:attribute name="width"                type="xsd:int"/>
... ...
@@ -112,7 +125,6 @@
112 112
       <xsd:attribute name="pix_fmt"              type="xsd:string"/>
113 113
       <xsd:attribute name="level"                type="xsd:int"/>
114 114
       <xsd:attribute name="timecode"             type="xsd:string"/>
115
-      <xsd:attribute name="attached_pic"         type="xsd:int"/>
116 115
 
117 116
       <!-- audio attributes -->
118 117
       <xsd:attribute name="sample_fmt"       type="xsd:string"/>
... ...
@@ -100,6 +100,7 @@ typedef enum {
100 100
     SECTION_ID_PROGRAM_VERSION,
101 101
     SECTION_ID_ROOT,
102 102
     SECTION_ID_STREAM,
103
+    SECTION_ID_STREAM_DISPOSITION,
103 104
     SECTION_ID_STREAMS,
104 105
     SECTION_ID_STREAM_TAGS
105 106
 } SectionID;
... ...
@@ -119,6 +120,7 @@ static const struct section sections[] = {
119 119
     [SECTION_ID_PROGRAM_VERSION] =    { SECTION_ID_PROGRAM_VERSION,    "program_version" },
120 120
     [SECTION_ID_ROOT] =               { SECTION_ID_ROOT,               "root", SECTION_FLAG_IS_WRAPPER },
121 121
     [SECTION_ID_STREAM] =             { SECTION_ID_STREAM,             "stream" },
122
+    [SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition" },
122 123
     [SECTION_ID_STREAMS] =            { SECTION_ID_STREAMS,            "streams", SECTION_FLAG_IS_ARRAY },
123 124
     [SECTION_ID_STREAM_TAGS] =        { SECTION_ID_STREAM_TAGS,        "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, .element_name = "tag" },
124 125
 };
... ...
@@ -1682,10 +1684,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
1682 1682
         print_str("codec_tag_string",    val_str);
1683 1683
         print_fmt("codec_tag", "0x%04x", dec_ctx->codec_tag);
1684 1684
 
1685
-        /* Print useful disposition */
1686
-        print_int("default", !!(stream->disposition & AV_DISPOSITION_DEFAULT));
1687
-        print_int("forced", !!(stream->disposition & AV_DISPOSITION_FORCED));
1688
-
1689 1685
         switch (dec_ctx->codec_type) {
1690 1686
         case AVMEDIA_TYPE_VIDEO:
1691 1687
             print_int("width",        dec_ctx->width);
... ...
@@ -1714,8 +1712,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
1714 1714
             } else {
1715 1715
                 print_str_opt("timecode", "N/A");
1716 1716
             }
1717
-            print_int("attached_pic",
1718
-                      !!(stream->disposition & AV_DISPOSITION_ATTACHED_PIC));
1719 1717
             break;
1720 1718
 
1721 1719
         case AVMEDIA_TYPE_AUDIO:
... ...
@@ -1762,6 +1758,26 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
1762 1762
     if (do_show_data)
1763 1763
         writer_print_data(w, "extradata", dec_ctx->extradata,
1764 1764
                                           dec_ctx->extradata_size);
1765
+
1766
+    /* Print disposition information */
1767
+#define PRINT_DISPOSITION(flagname, name) do {                                \
1768
+        print_int(name, !!(stream->disposition & AV_DISPOSITION_##flagname)); \
1769
+    } while (0)
1770
+
1771
+    writer_print_section_header(w, SECTION_ID_STREAM_DISPOSITION);
1772
+    PRINT_DISPOSITION(DEFAULT,          "default");
1773
+    PRINT_DISPOSITION(DUB,              "dub");
1774
+    PRINT_DISPOSITION(ORIGINAL,         "original");
1775
+    PRINT_DISPOSITION(COMMENT,          "comment");
1776
+    PRINT_DISPOSITION(LYRICS,           "lyrics");
1777
+    PRINT_DISPOSITION(KARAOKE,          "karaoke");
1778
+    PRINT_DISPOSITION(FORCED,           "forced");
1779
+    PRINT_DISPOSITION(HEARING_IMPAIRED, "hearing_impaired");
1780
+    PRINT_DISPOSITION(VISUAL_IMPAIRED,  "visual_impaired");
1781
+    PRINT_DISPOSITION(CLEAN_EFFECTS,    "clean_effects");
1782
+    PRINT_DISPOSITION(ATTACHED_PIC,     "attached_pic");
1783
+    writer_print_section_footer(w);
1784
+
1765 1785
     show_tags(w, stream->metadata, SECTION_ID_STREAM_TAGS);
1766 1786
 
1767 1787
     writer_print_section_footer(w);
... ...
@@ -26,7 +26,7 @@ packet|codec_type=video|stream_index=1|pts=3|pts_time=0.120000|dts=3|dts_time=0.
26 26
 frame|media_type=video|key_frame=1|pkt_pts=3|pkt_pts_time=0.120000|pkt_dts=3|pkt_dts_time=0.120000|pkt_duration=1|pkt_duration_time=0.040000|pkt_pos=794128|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
27 27
 packet|codec_type=video|stream_index=2|pts=3|pts_time=0.120000|dts=3|dts_time=0.120000|duration=1|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=1024550|flags=K
28 28
 frame|media_type=video|key_frame=1|pkt_pts=3|pkt_pts_time=0.120000|pkt_dts=3|pkt_dts_time=0.120000|pkt_duration=1|pkt_duration_time=0.040000|pkt_pos=1024550|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
29
-stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=[1][0][0][0]|codec_tag=0x0001|default=0|forced=0|sample_fmt=s16|sample_rate=44100|channels=1|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=527313|duration=11.957211|bit_rate=705600|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6
30
-stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|default=0|forced=0|width=320|height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|timecode=N/A|attached_pic=0|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4
31
-stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|default=0|forced=0|width=100|height=100|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|timecode=N/A|attached_pic=0|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4
29
+stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=[1][0][0][0]|codec_tag=0x0001|sample_fmt=s16|sample_rate=44100|channels=1|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=527313|duration=11.957211|bit_rate=705600|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
30
+stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
31
+stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
32 32
 format|filename=tests/data/ffprobe-test.nut|nb_streams=3|format_name=nut|start_time=0.000000|duration=11.960000|size=1054625|bit_rate=705434|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': <tag value="x">|tag:comment2=I ♥ Üñîçød€
... ...
@@ -26,7 +26,7 @@ packet,video,1,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,230400,794128,K
26 26
 frame,video,1,3,0.120000,3,0.120000,1,0.040000,794128,320,240,rgb24,1:1,I,0,0,0,0,0,0
27 27
 packet,video,2,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,30000,1024550,K
28 28
 frame,video,1,3,0.120000,3,0.120000,1,0.040000,1024550,100,100,rgb24,1:1,I,0,0,0,0,0,0
29
-stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,0,0,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527313,11.957211,705600,N/A,6,6
30
-stream,1,rawvideo,unknown,video,1/25,RGB[24],0x18424752,0,0,320,240,0,1:1,4:3,rgb24,-99,N/A,0,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4
31
-stream,2,rawvideo,unknown,video,1/25,RGB[24],0x18424752,0,0,100,100,0,1:1,1:1,rgb24,-99,N/A,0,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4
29
+stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527313,11.957211,705600,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0
30
+stream,1,rawvideo,unknown,video,1/25,RGB[24],0x18424752,320,240,0,1:1,4:3,rgb24,-99,N/A,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
31
+stream,2,rawvideo,unknown,video,1/25,RGB[24],0x18424752,100,100,0,1:1,1:1,rgb24,-99,N/A,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
32 32
 format,tests/data/ffprobe-test.nut,3,nut,0.000000,11.960000,1054625,705434,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
... ...
@@ -482,8 +482,6 @@ codec_type=audio
482 482
 codec_time_base=1/44100
483 483
 codec_tag_string=[1][0][0][0]
484 484
 codec_tag=0x0001
485
-default=0
486
-forced=0
487 485
 sample_fmt=s16
488 486
 sample_rate=44100
489 487
 channels=1
... ...
@@ -500,6 +498,17 @@ bit_rate=705600
500 500
 nb_frames=N/A
501 501
 nb_read_frames=6
502 502
 nb_read_packets=6
503
+DISPOSITION:default=0
504
+DISPOSITION:dub=0
505
+DISPOSITION:original=0
506
+DISPOSITION:comment=0
507
+DISPOSITION:lyrics=0
508
+DISPOSITION:karaoke=0
509
+DISPOSITION:forced=0
510
+DISPOSITION:hearing_impaired=0
511
+DISPOSITION:visual_impaired=0
512
+DISPOSITION:clean_effects=0
513
+DISPOSITION:attached_pic=0
503 514
 [/STREAM]
504 515
 [STREAM]
505 516
 index=1
... ...
@@ -509,8 +518,6 @@ codec_type=video
509 509
 codec_time_base=1/25
510 510
 codec_tag_string=RGB[24]
511 511
 codec_tag=0x18424752
512
-default=0
513
-forced=0
514 512
 width=320
515 513
 height=240
516 514
 has_b_frames=0
... ...
@@ -519,7 +526,6 @@ display_aspect_ratio=4:3
519 519
 pix_fmt=rgb24
520 520
 level=-99
521 521
 timecode=N/A
522
-attached_pic=0
523 522
 id=N/A
524 523
 r_frame_rate=25/1
525 524
 avg_frame_rate=0/0
... ...
@@ -532,6 +538,17 @@ bit_rate=N/A
532 532
 nb_frames=N/A
533 533
 nb_read_frames=4
534 534
 nb_read_packets=4
535
+DISPOSITION:default=0
536
+DISPOSITION:dub=0
537
+DISPOSITION:original=0
538
+DISPOSITION:comment=0
539
+DISPOSITION:lyrics=0
540
+DISPOSITION:karaoke=0
541
+DISPOSITION:forced=0
542
+DISPOSITION:hearing_impaired=0
543
+DISPOSITION:visual_impaired=0
544
+DISPOSITION:clean_effects=0
545
+DISPOSITION:attached_pic=0
535 546
 [/STREAM]
536 547
 [STREAM]
537 548
 index=2
... ...
@@ -541,8 +558,6 @@ codec_type=video
541 541
 codec_time_base=1/25
542 542
 codec_tag_string=RGB[24]
543 543
 codec_tag=0x18424752
544
-default=0
545
-forced=0
546 544
 width=100
547 545
 height=100
548 546
 has_b_frames=0
... ...
@@ -551,7 +566,6 @@ display_aspect_ratio=1:1
551 551
 pix_fmt=rgb24
552 552
 level=-99
553 553
 timecode=N/A
554
-attached_pic=0
555 554
 id=N/A
556 555
 r_frame_rate=25/1
557 556
 avg_frame_rate=0/0
... ...
@@ -564,6 +578,17 @@ bit_rate=N/A
564 564
 nb_frames=N/A
565 565
 nb_read_frames=4
566 566
 nb_read_packets=4
567
+DISPOSITION:default=0
568
+DISPOSITION:dub=0
569
+DISPOSITION:original=0
570
+DISPOSITION:comment=0
571
+DISPOSITION:lyrics=0
572
+DISPOSITION:karaoke=0
573
+DISPOSITION:forced=0
574
+DISPOSITION:hearing_impaired=0
575
+DISPOSITION:visual_impaired=0
576
+DISPOSITION:clean_effects=0
577
+DISPOSITION:attached_pic=0
567 578
 [/STREAM]
568 579
 [FORMAT]
569 580
 filename=tests/data/ffprobe-test.nut
... ...
@@ -425,8 +425,6 @@ streams.stream.0.codec_type="audio"
425 425
 streams.stream.0.codec_time_base="1/44100"
426 426
 streams.stream.0.codec_tag_string="[1][0][0][0]"
427 427
 streams.stream.0.codec_tag="0x0001"
428
-streams.stream.0.default=0
429
-streams.stream.0.forced=0
430 428
 streams.stream.0.sample_fmt="s16"
431 429
 streams.stream.0.sample_rate="44100"
432 430
 streams.stream.0.channels=1
... ...
@@ -443,6 +441,17 @@ streams.stream.0.bit_rate="705600"
443 443
 streams.stream.0.nb_frames="N/A"
444 444
 streams.stream.0.nb_read_frames="6"
445 445
 streams.stream.0.nb_read_packets="6"
446
+streams.stream.0.disposition.default=0
447
+streams.stream.0.disposition.dub=0
448
+streams.stream.0.disposition.original=0
449
+streams.stream.0.disposition.comment=0
450
+streams.stream.0.disposition.lyrics=0
451
+streams.stream.0.disposition.karaoke=0
452
+streams.stream.0.disposition.forced=0
453
+streams.stream.0.disposition.hearing_impaired=0
454
+streams.stream.0.disposition.visual_impaired=0
455
+streams.stream.0.disposition.clean_effects=0
456
+streams.stream.0.disposition.attached_pic=0
446 457
 streams.stream.1.index=1
447 458
 streams.stream.1.codec_name="rawvideo"
448 459
 streams.stream.1.profile="unknown"
... ...
@@ -450,8 +459,6 @@ streams.stream.1.codec_type="video"
450 450
 streams.stream.1.codec_time_base="1/25"
451 451
 streams.stream.1.codec_tag_string="RGB[24]"
452 452
 streams.stream.1.codec_tag="0x18424752"
453
-streams.stream.1.default=0
454
-streams.stream.1.forced=0
455 453
 streams.stream.1.width=320
456 454
 streams.stream.1.height=240
457 455
 streams.stream.1.has_b_frames=0
... ...
@@ -460,7 +467,6 @@ streams.stream.1.display_aspect_ratio="4:3"
460 460
 streams.stream.1.pix_fmt="rgb24"
461 461
 streams.stream.1.level=-99
462 462
 streams.stream.1.timecode="N/A"
463
-streams.stream.1.attached_pic=0
464 463
 streams.stream.1.id="N/A"
465 464
 streams.stream.1.r_frame_rate="25/1"
466 465
 streams.stream.1.avg_frame_rate="0/0"
... ...
@@ -473,6 +479,17 @@ streams.stream.1.bit_rate="N/A"
473 473
 streams.stream.1.nb_frames="N/A"
474 474
 streams.stream.1.nb_read_frames="4"
475 475
 streams.stream.1.nb_read_packets="4"
476
+streams.stream.1.disposition.default=0
477
+streams.stream.1.disposition.dub=0
478
+streams.stream.1.disposition.original=0
479
+streams.stream.1.disposition.comment=0
480
+streams.stream.1.disposition.lyrics=0
481
+streams.stream.1.disposition.karaoke=0
482
+streams.stream.1.disposition.forced=0
483
+streams.stream.1.disposition.hearing_impaired=0
484
+streams.stream.1.disposition.visual_impaired=0
485
+streams.stream.1.disposition.clean_effects=0
486
+streams.stream.1.disposition.attached_pic=0
476 487
 streams.stream.2.index=2
477 488
 streams.stream.2.codec_name="rawvideo"
478 489
 streams.stream.2.profile="unknown"
... ...
@@ -480,8 +497,6 @@ streams.stream.2.codec_type="video"
480 480
 streams.stream.2.codec_time_base="1/25"
481 481
 streams.stream.2.codec_tag_string="RGB[24]"
482 482
 streams.stream.2.codec_tag="0x18424752"
483
-streams.stream.2.default=0
484
-streams.stream.2.forced=0
485 483
 streams.stream.2.width=100
486 484
 streams.stream.2.height=100
487 485
 streams.stream.2.has_b_frames=0
... ...
@@ -490,7 +505,6 @@ streams.stream.2.display_aspect_ratio="1:1"
490 490
 streams.stream.2.pix_fmt="rgb24"
491 491
 streams.stream.2.level=-99
492 492
 streams.stream.2.timecode="N/A"
493
-streams.stream.2.attached_pic=0
494 493
 streams.stream.2.id="N/A"
495 494
 streams.stream.2.r_frame_rate="25/1"
496 495
 streams.stream.2.avg_frame_rate="0/0"
... ...
@@ -503,6 +517,17 @@ streams.stream.2.bit_rate="N/A"
503 503
 streams.stream.2.nb_frames="N/A"
504 504
 streams.stream.2.nb_read_frames="4"
505 505
 streams.stream.2.nb_read_packets="4"
506
+streams.stream.2.disposition.default=0
507
+streams.stream.2.disposition.dub=0
508
+streams.stream.2.disposition.original=0
509
+streams.stream.2.disposition.comment=0
510
+streams.stream.2.disposition.lyrics=0
511
+streams.stream.2.disposition.karaoke=0
512
+streams.stream.2.disposition.forced=0
513
+streams.stream.2.disposition.hearing_impaired=0
514
+streams.stream.2.disposition.visual_impaired=0
515
+streams.stream.2.disposition.clean_effects=0
516
+streams.stream.2.disposition.attached_pic=0
506 517
 format.filename="tests/data/ffprobe-test.nut"
507 518
 format.nb_streams=3
508 519
 format.format_name="nut"
... ...
@@ -484,8 +484,6 @@ codec_type=audio
484 484
 codec_time_base=1/44100
485 485
 codec_tag_string=[1][0][0][0]
486 486
 codec_tag=0x0001
487
-default=0
488
-forced=0
489 487
 sample_fmt=s16
490 488
 sample_rate=44100
491 489
 channels=1
... ...
@@ -503,6 +501,19 @@ nb_frames=N/A
503 503
 nb_read_frames=6
504 504
 nb_read_packets=6
505 505
 
506
+[streams.stream.0.disposition]
507
+default=0
508
+dub=0
509
+original=0
510
+comment=0
511
+lyrics=0
512
+karaoke=0
513
+forced=0
514
+hearing_impaired=0
515
+visual_impaired=0
516
+clean_effects=0
517
+attached_pic=0
518
+
506 519
 [streams.stream.1]
507 520
 index=1
508 521
 codec_name=rawvideo
... ...
@@ -511,8 +522,6 @@ codec_type=video
511 511
 codec_time_base=1/25
512 512
 codec_tag_string=RGB[24]
513 513
 codec_tag=0x18424752
514
-default=0
515
-forced=0
516 514
 width=320
517 515
 height=240
518 516
 has_b_frames=0
... ...
@@ -521,7 +530,6 @@ display_aspect_ratio=4\:3
521 521
 pix_fmt=rgb24
522 522
 level=-99
523 523
 timecode=N/A
524
-attached_pic=0
525 524
 id=N/A
526 525
 r_frame_rate=25/1
527 526
 avg_frame_rate=0/0
... ...
@@ -535,6 +543,19 @@ nb_frames=N/A
535 535
 nb_read_frames=4
536 536
 nb_read_packets=4
537 537
 
538
+[streams.stream.1.disposition]
539
+default=0
540
+dub=0
541
+original=0
542
+comment=0
543
+lyrics=0
544
+karaoke=0
545
+forced=0
546
+hearing_impaired=0
547
+visual_impaired=0
548
+clean_effects=0
549
+attached_pic=0
550
+
538 551
 [streams.stream.2]
539 552
 index=2
540 553
 codec_name=rawvideo
... ...
@@ -543,8 +564,6 @@ codec_type=video
543 543
 codec_time_base=1/25
544 544
 codec_tag_string=RGB[24]
545 545
 codec_tag=0x18424752
546
-default=0
547
-forced=0
548 546
 width=100
549 547
 height=100
550 548
 has_b_frames=0
... ...
@@ -553,7 +572,6 @@ display_aspect_ratio=1\:1
553 553
 pix_fmt=rgb24
554 554
 level=-99
555 555
 timecode=N/A
556
-attached_pic=0
557 556
 id=N/A
558 557
 r_frame_rate=25/1
559 558
 avg_frame_rate=0/0
... ...
@@ -567,6 +585,19 @@ nb_frames=N/A
567 567
 nb_read_frames=4
568 568
 nb_read_packets=4
569 569
 
570
+[streams.stream.2.disposition]
571
+default=0
572
+dub=0
573
+original=0
574
+comment=0
575
+lyrics=0
576
+karaoke=0
577
+forced=0
578
+hearing_impaired=0
579
+visual_impaired=0
580
+clean_effects=0
581
+attached_pic=0
582
+
570 583
 [format]
571 584
 filename=tests/data/ffprobe-test.nut
572 585
 nb_streams=3
... ...
@@ -479,8 +479,6 @@
479 479
             "codec_time_base": "1/44100",
480 480
             "codec_tag_string": "[1][0][0][0]",
481 481
             "codec_tag": "0x0001",
482
-            "default": 0,
483
-            "forced": 0,
484 482
             "sample_fmt": "s16",
485 483
             "sample_rate": "44100",
486 484
             "channels": 1,
... ...
@@ -494,7 +492,20 @@
494 494
             "duration": "11.957211",
495 495
             "bit_rate": "705600",
496 496
             "nb_read_frames": "6",
497
-            "nb_read_packets": "6"
497
+            "nb_read_packets": "6",
498
+            "disposition": {
499
+                "default": 0,
500
+                "dub": 0,
501
+                "original": 0,
502
+                "comment": 0,
503
+                "lyrics": 0,
504
+                "karaoke": 0,
505
+                "forced": 0,
506
+                "hearing_impaired": 0,
507
+                "visual_impaired": 0,
508
+                "clean_effects": 0,
509
+                "attached_pic": 0
510
+            }
498 511
         },
499 512
         {
500 513
             "index": 1,
... ...
@@ -503,8 +514,6 @@
503 503
             "codec_time_base": "1/25",
504 504
             "codec_tag_string": "RGB[24]",
505 505
             "codec_tag": "0x18424752",
506
-            "default": 0,
507
-            "forced": 0,
508 506
             "width": 320,
509 507
             "height": 240,
510 508
             "has_b_frames": 0,
... ...
@@ -512,7 +521,6 @@
512 512
             "display_aspect_ratio": "4:3",
513 513
             "pix_fmt": "rgb24",
514 514
             "level": -99,
515
-            "attached_pic": 0,
516 515
             "r_frame_rate": "25/1",
517 516
             "avg_frame_rate": "0/0",
518 517
             "time_base": "1/25",
... ...
@@ -521,7 +529,20 @@
521 521
             "duration_ts": 299,
522 522
             "duration": "11.960000",
523 523
             "nb_read_frames": "4",
524
-            "nb_read_packets": "4"
524
+            "nb_read_packets": "4",
525
+            "disposition": {
526
+                "default": 0,
527
+                "dub": 0,
528
+                "original": 0,
529
+                "comment": 0,
530
+                "lyrics": 0,
531
+                "karaoke": 0,
532
+                "forced": 0,
533
+                "hearing_impaired": 0,
534
+                "visual_impaired": 0,
535
+                "clean_effects": 0,
536
+                "attached_pic": 0
537
+            }
525 538
         },
526 539
         {
527 540
             "index": 2,
... ...
@@ -530,8 +551,6 @@
530 530
             "codec_time_base": "1/25",
531 531
             "codec_tag_string": "RGB[24]",
532 532
             "codec_tag": "0x18424752",
533
-            "default": 0,
534
-            "forced": 0,
535 533
             "width": 100,
536 534
             "height": 100,
537 535
             "has_b_frames": 0,
... ...
@@ -539,7 +558,6 @@
539 539
             "display_aspect_ratio": "1:1",
540 540
             "pix_fmt": "rgb24",
541 541
             "level": -99,
542
-            "attached_pic": 0,
543 542
             "r_frame_rate": "25/1",
544 543
             "avg_frame_rate": "0/0",
545 544
             "time_base": "1/25",
... ...
@@ -548,7 +566,20 @@
548 548
             "duration_ts": 299,
549 549
             "duration": "11.960000",
550 550
             "nb_read_frames": "4",
551
-            "nb_read_packets": "4"
551
+            "nb_read_packets": "4",
552
+            "disposition": {
553
+                "default": 0,
554
+                "dub": 0,
555
+                "original": 0,
556
+                "comment": 0,
557
+                "lyrics": 0,
558
+                "karaoke": 0,
559
+                "forced": 0,
560
+                "hearing_impaired": 0,
561
+                "visual_impaired": 0,
562
+                "clean_effects": 0,
563
+                "attached_pic": 0
564
+            }
552 565
         }
553 566
     ],
554 567
     "format": {
... ...
@@ -32,9 +32,15 @@
32 32
     </packets_and_frames>
33 33
 
34 34
     <streams>
35
-        <stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_time_base="1/44100" codec_tag_string="[1][0][0][0]" codec_tag="0x0001" default="0" forced="0" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" duration_ts="527313" duration="11.957211" bit_rate="705600" nb_read_frames="6" nb_read_packets="6"/>
36
-        <stream index="1" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" default="0" forced="0" width="320" height="240" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" attached_pic="0" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4"/>
37
-        <stream index="2" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" default="0" forced="0" width="100" height="100" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" attached_pic="0" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4"/>
35
+        <stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_time_base="1/44100" codec_tag_string="[1][0][0][0]" codec_tag="0x0001" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" duration_ts="527313" duration="11.957211" bit_rate="705600" nb_read_frames="6" nb_read_packets="6">
36
+            <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"/>
37
+        </stream>
38
+        <stream index="1" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4">
39
+            <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"/>
40
+        </stream>
41
+        <stream index="2" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="100" height="100" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4">
42
+            <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"/>
43
+        </stream>
38 44
     </streams>
39 45
 
40 46
     <format filename="tests/data/ffprobe-test.nut" nb_streams="3" format_name="nut" start_time="0.000000" duration="11.960000" size="1054625" bit_rate="705434">