From 823f2c603d6e7914ddad6bda0f225f7e63b36bcf Mon Sep 17 00:00:00 2001 From: Dan Oscarsson Date: Sun, 26 Mar 2017 13:30:27 +0200 Subject: player: print additional stream info In print_stream print additional stream info for audio and video track. While it may be incorrect it is mostly correct and good info to have. --- player/loadfile.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/player/loadfile.c b/player/loadfile.c index dba02ee828..769a1a5254 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -132,7 +132,19 @@ static void print_stream(struct MPContext *mpctx, struct track *t) if (t->title) APPEND(b, " '%s'", t->title); const char *codec = s ? s->codec->codec : NULL; - APPEND(b, " (%s)", codec ? codec : ""); + APPEND(b, " (%s", codec ? codec : ""); + if (t->type == STREAM_VIDEO) { + if (s && s->codec->disp_w) + APPEND(b, " %dx%d", s->codec->disp_w, s->codec->disp_h); + if (s && s->codec->fps) + APPEND(b, " %.3f Hz", s->codec->fps); + } else if (t->type == STREAM_AUDIO) { + if (s && s->codec->channels.num) + APPEND(b, " %d ch", s->codec->channels.num); + if (s && s->codec->samplerate) + APPEND(b, " %d Hz", s->codec->samplerate); + } + APPEND(b, ")"); if (t->is_external) APPEND(b, " (external)"); MP_INFO(mpctx, "%s\n", b); -- cgit v1.2.3