[FFmpeg-cvslog] ffprobe: display the codec profile in show_stream()

Christian Schmidt git at videolan.org
Sat May 26 12:41:12 CEST 2012


ffmpeg | branch: master | Christian Schmidt <schmidt at digadd.de> | Fri May 25 15:01:59 2012 +0200| [f7d5272456ff67d6af262bb220d2af68c85cbb92] | committer: Stefano Sabatini

ffprobe: display the codec profile in show_stream()

Signed-off-by: Stefano Sabatini <stefasab at gmail.com>

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

 doc/ffprobe.xsd |    1 +
 ffprobe.c       |    6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index 3984b7d..f8e9fe9 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -83,6 +83,7 @@
       <xsd:attribute name="index"            type="xsd:int" use="required"/>
       <xsd:attribute name="codec_name"       type="xsd:string" />
       <xsd:attribute name="codec_long_name"  type="xsd:string" />
+      <xsd:attribute name="profile"          type="xsd:string" />
       <xsd:attribute name="codec_type"       type="xsd:string" />
       <xsd:attribute name="codec_time_base"  type="xsd:string" use="required"/>
       <xsd:attribute name="codec_tag"        type="xsd:string" use="required"/>
diff --git a/ffprobe.c b/ffprobe.c
index d53ec11..c98bdac 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1364,6 +1364,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
     print_int("index", stream->index);
 
     if ((dec_ctx = stream->codec)) {
+        const char *profile = NULL;
         if ((dec = dec_ctx->codec)) {
             print_str("codec_name",      dec->name);
             print_str("codec_long_name", dec->long_name);
@@ -1372,6 +1373,11 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
             print_str_opt("codec_long_name", "unknown");
         }
 
+        if (dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
+            print_str("profile", profile);
+        else
+            print_str_opt("profile", "unknown");
+
         s = av_get_media_type_string(dec_ctx->codec_type);
         if (s) print_str    ("codec_type", s);
         else   print_str_opt("codec_type", "unknown");



More information about the ffmpeg-cvslog mailing list