mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
ffprobe: Add a few common disposition cases
This info is crucial in knowing which stream to pick in an automated setup. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
b89c16e73e
commit
8e2a950b29
@ -100,6 +100,8 @@
|
||||
<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"/>
|
||||
@ -110,6 +112,7 @@
|
||||
<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"/>
|
||||
|
@ -1665,6 +1665,10 @@ 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);
|
||||
@ -1693,6 +1697,8 @@ 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:
|
||||
|
Loading…
Reference in New Issue
Block a user