diff options
author | wm4 <wm4@nowhere> | 2013-05-21 00:32:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-21 00:32:38 +0200 |
commit | 9ccb1739b2df3925d78a977b988ba666dd5bccb6 (patch) | |
tree | dc7edfc434a374cfdf86434f090b1e1b5e8dddd6 /core/mplayer.c | |
parent | 08bfe8721c69d71981b17e017df9a860f6a74a39 (diff) | |
download | mpv-9ccb1739b2df3925d78a977b988ba666dd5bccb6.tar.bz2 mpv-9ccb1739b2df3925d78a977b988ba666dd5bccb6.tar.xz |
mplayer: re-add some legacy slave mode output for issue #92
In the long run this should be done differently. ID_... output sucks.
This commit will be reverted as soon as I have a good idea how this
should be done properly.
Diffstat (limited to 'core/mplayer.c')
-rw-r--r-- | core/mplayer.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/core/mplayer.c b/core/mplayer.c index a0b18cab62..6a2a530469 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -252,21 +252,22 @@ static double get_play_end_pts(struct MPContext *mpctx) return MP_NOPTS_VALUE; } -static void print_stream(struct MPContext *mpctx, struct track *t, int id) +static void print_stream(struct MPContext *mpctx, struct track *t) { struct sh_stream *s = t->stream; const char *tname = "?"; const char *selopt = "?"; const char *langopt = "?"; + const char *iid = NULL; switch (t->type) { case STREAM_VIDEO: - tname = "Video"; selopt = "vid"; langopt = NULL; + tname = "Video"; selopt = "vid"; langopt = NULL; iid = "VID"; break; case STREAM_AUDIO: - tname = "Audio"; selopt = "aid"; langopt = "alang"; + tname = "Audio"; selopt = "aid"; langopt = "alang"; iid = "AID"; break; case STREAM_SUB: - tname = "Subs"; selopt = "sid"; langopt = "slang"; + tname = "Subs"; selopt = "sid"; langopt = "slang"; iid = "SID"; break; } mp_msg(MSGT_CPLAYER, MSGL_INFO, "[stream] %-5s %3s", @@ -289,6 +290,15 @@ static void print_stream(struct MPContext *mpctx, struct track *t, int id) if (t->is_external) mp_msg(MSGT_CPLAYER, MSGL_INFO, " (external)"); mp_msg(MSGT_CPLAYER, MSGL_INFO, "\n"); + // legacy compatibility + if (!iid) + return; + int id = t->user_tid; + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_%s_ID=%d\n", iid, id); + if (t->title) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_%s_%d_NAME=%s\n", iid, id, t->title); + if (t->lang) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_%s_%d_LANG=%s\n", iid, id, t->lang); } static void print_file_properties(struct MPContext *mpctx, const char *filename) @@ -369,7 +379,7 @@ static void print_file_properties(struct MPContext *mpctx, const char *filename) for (int t = 0; t < STREAM_TYPE_COUNT; t++) { for (int n = 0; n < mpctx->num_tracks; n++) if (mpctx->tracks[n]->type == t) - print_stream(mpctx, mpctx->tracks[n], n); + print_stream(mpctx, mpctx->tracks[n]); } } |