Revert "ffprobe: Add a few common disposition cases"
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 28 Sep 2012 00:24:05 +0000 (02:24 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 28 Sep 2012 00:27:10 +0000 (02:27 +0200)
revert requested by ubitux for 1.0

This reverts commit 8e2a950b297b97605e97c454363f2f8555b004f0.

doc/ffprobe.xsd
ffprobe.c
tests/ref/fate/ffprobe_compact
tests/ref/fate/ffprobe_csv
tests/ref/fate/ffprobe_default
tests/ref/fate/ffprobe_flat
tests/ref/fate/ffprobe_ini
tests/ref/fate/ffprobe_json
tests/ref/fate/ffprobe_xml

index 403d59e..595d66f 100644 (file)
       <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
       <xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
       <xsd:attribute name="extradata"        type="xsd:string" />
-      <xsd:attribute name="default"          type="xsd:int" use="required"/>
-      <xsd:attribute name="forced"           type="xsd:int" use="required"/>
 
       <!-- video attributes -->
       <xsd:attribute name="width"                type="xsd:int"/>
       <xsd:attribute name="pix_fmt"              type="xsd:string"/>
       <xsd:attribute name="level"                type="xsd:int"/>
       <xsd:attribute name="timecode"             type="xsd:string"/>
-      <xsd:attribute name="attached_pic"         type="xsd:int"/>
 
       <!-- audio attributes -->
       <xsd:attribute name="sample_fmt"       type="xsd:string"/>
index e9f66b0..7c419c8 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1621,10 +1621,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
         print_str("codec_tag_string",    val_str);
         print_fmt("codec_tag", "0x%04x", dec_ctx->codec_tag);
 
-        /* Print useful disposition */
-        print_int("default", !!(stream->disposition & AV_DISPOSITION_DEFAULT));
-        print_int("forced", !!(stream->disposition & AV_DISPOSITION_FORCED));
-
         switch (dec_ctx->codec_type) {
         case AVMEDIA_TYPE_VIDEO:
             print_int("width",        dec_ctx->width);
@@ -1653,8 +1649,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
             } else {
                 print_str_opt("timecode", "N/A");
             }
-            print_int("attached_pic",
-                      !!(stream->disposition & AV_DISPOSITION_ATTACHED_PIC));
             break;
 
         case AVMEDIA_TYPE_AUDIO:
index 71239fe..0a47339 100644 (file)
@@ -26,7 +26,7 @@ packet|codec_type=video|stream_index=1|pts=3|pts_time=0.120000|dts=3|dts_time=0.
 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
 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
 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
-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
-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
-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
+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
+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
+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
 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€
index 86e4a1a..f56acac 100644 (file)
@@ -26,7 +26,7 @@ packet,video,1,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,230400,794128,K
 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
 packet,video,2,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,30000,1024550,K
 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
-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
-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
-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
+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
+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
+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
 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€
index a9b555b..8b7a1c3 100644 (file)
@@ -482,8 +482,6 @@ 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
@@ -509,8 +507,6 @@ 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
@@ -519,7 +515,6 @@ 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
@@ -541,8 +536,6 @@ 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
@@ -551,7 +544,6 @@ 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
index e9e2f87..f9692b2 100644 (file)
@@ -425,8 +425,6 @@ streams.stream.0.codec_type="audio"
 streams.stream.0.codec_time_base="1/44100"
 streams.stream.0.codec_tag_string="[1][0][0][0]"
 streams.stream.0.codec_tag="0x0001"
-streams.stream.0.default=0
-streams.stream.0.forced=0
 streams.stream.0.sample_fmt="s16"
 streams.stream.0.sample_rate="44100"
 streams.stream.0.channels=1
@@ -450,8 +448,6 @@ streams.stream.1.codec_type="video"
 streams.stream.1.codec_time_base="1/25"
 streams.stream.1.codec_tag_string="RGB[24]"
 streams.stream.1.codec_tag="0x18424752"
-streams.stream.1.default=0
-streams.stream.1.forced=0
 streams.stream.1.width=320
 streams.stream.1.height=240
 streams.stream.1.has_b_frames=0
@@ -460,7 +456,6 @@ streams.stream.1.display_aspect_ratio="4:3"
 streams.stream.1.pix_fmt="rgb24"
 streams.stream.1.level=-99
 streams.stream.1.timecode="N/A"
-streams.stream.1.attached_pic=0
 streams.stream.1.id="N/A"
 streams.stream.1.r_frame_rate="25/1"
 streams.stream.1.avg_frame_rate="0/0"
@@ -480,8 +475,6 @@ streams.stream.2.codec_type="video"
 streams.stream.2.codec_time_base="1/25"
 streams.stream.2.codec_tag_string="RGB[24]"
 streams.stream.2.codec_tag="0x18424752"
-streams.stream.2.default=0
-streams.stream.2.forced=0
 streams.stream.2.width=100
 streams.stream.2.height=100
 streams.stream.2.has_b_frames=0
@@ -490,7 +483,6 @@ streams.stream.2.display_aspect_ratio="1:1"
 streams.stream.2.pix_fmt="rgb24"
 streams.stream.2.level=-99
 streams.stream.2.timecode="N/A"
-streams.stream.2.attached_pic=0
 streams.stream.2.id="N/A"
 streams.stream.2.r_frame_rate="25/1"
 streams.stream.2.avg_frame_rate="0/0"
index 1c38659..aef5d9a 100644 (file)
@@ -484,8 +484,6 @@ 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
@@ -511,8 +509,6 @@ 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
@@ -521,7 +517,6 @@ 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
@@ -543,8 +538,6 @@ 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
@@ -553,7 +546,6 @@ 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
index 27b9cd2..fb1a6f6 100644 (file)
             "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,
             "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,
             "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",
             "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,
             "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",
index 6237664..e73a15c 100644 (file)
@@ -32,9 +32,9 @@
     </packets_and_frames>
 
     <streams>
-        <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"/>
-        <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"/>
-        <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"/>
+        <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"/>
+        <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"/>
+        <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"/>
     </streams>
 
     <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">