aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-09-08 22:49:53 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-09-08 22:49:53 +0000
commitd0526ecf66ef72e8bb304e5c6ee521c909e792b8 (patch)
treeb5f3ef017471ab248d2be6188c8fc4cab41df969 /ffplay.c
parent98ce5991d766ad08c192632baedc896fd32fb7ad (diff)
downloadffmpeg-d0526ecf66ef72e8bb304e5c6ee521c909e792b8.tar.gz
show stream info with -stats
Originally committed as revision 2239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index f340153f80..f388c85c4d 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1224,6 +1224,22 @@ static void stream_component_close(VideoState *is, int stream_index)
}
}
+void dump_stream_info(AVFormatContext *s)
+{
+ if (s->track != 0)
+ fprintf(stderr, "Track: %d\n", s->track);
+ if (s->title[0] != '\0')
+ fprintf(stderr, "Title: %s\n", s->title);
+ if (s->author[0] != '\0')
+ fprintf(stderr, "Author: %s\n", s->author);
+ if (s->album[0] != '\0')
+ fprintf(stderr, "Album: %s\n", s->album);
+ if (s->year != 0)
+ fprintf(stderr, "Year: %d\n", s->year);
+ if (s->genre[0] != '\0')
+ fprintf(stderr, "Genre: %s\n", s->genre);
+}
+
/* since we have only one decoding thread, we can use a global
variable instead of a thread local variable */
static VideoState *global_video_state;
@@ -1280,6 +1296,7 @@ static int decode_thread(void *arg)
}
if (show_status) {
dump_format(ic, 0, is->filename, 0);
+ dump_stream_info(ic);
}
/* open the streams */