summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 18:25:34 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 18:25:34 +0300
commit7795726e0f8c70edd6ecde7fd2137214af302f4f (patch)
tree87a087e69a0e2912183736de409676f824fb2248 /command.c
parentba3b65b92f3f822fa75b0210b841557f5b20f6d1 (diff)
parente16f02fe4001f3056b8efd1a099a563569b73f5d (diff)
downloadmpv-7795726e0f8c70edd6ecde7fd2137214af302f4f.tar.bz2
mpv-7795726e0f8c70edd6ecde7fd2137214af302f4f.tar.xz
Merge svn changes up to r31033
Diffstat (limited to 'command.c')
-rw-r--r--command.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/command.c b/command.c
index aaf5ec4f95..80babbd429 100644
--- a/command.c
+++ b/command.c
@@ -2917,6 +2917,17 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
mpctx->stop_play = PT_STOP;
break;
+ case MP_CMD_OSD_SHOW_PROGRESSION:{
+ int len = demuxer_get_time_length(mpctx->demuxer);
+ int pts = demuxer_get_current_time(mpctx->demuxer);
+ set_osd_bar(mpctx, 0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer));
+ set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
+ "%c %02d:%02d:%02d / %02d:%02d:%02d",
+ mpctx->osd_function, pts/3600, (pts/60)%60, pts%60,
+ len/3600, (len/60)%60, len%60);
+ }
+ break;
+
#ifdef CONFIG_RADIO
case MP_CMD_RADIO_STEP_CHANNEL:
if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
@@ -3387,6 +3398,43 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
#endif
+ case MP_CMD_AF_SWITCH:
+ if (sh_audio)
+ {
+ af_uninit(mpctx->mixer.afilter);
+ af_init(mpctx->mixer.afilter);
+ }
+ case MP_CMD_AF_ADD:
+ case MP_CMD_AF_DEL:
+ if (!sh_audio)
+ break;
+ {
+ char* af_args = strdup(cmd->args[0].v.s);
+ char* af_commands = af_args;
+ char* af_command;
+ af_instance_t* af;
+ while ((af_command = strsep(&af_commands, ",")) != NULL)
+ {
+ if (cmd->id == MP_CMD_AF_DEL)
+ {
+ af = af_get(mpctx->mixer.afilter, af_command);
+ if (af != NULL)
+ af_remove(mpctx->mixer.afilter, af);
+ }
+ else
+ af_add(mpctx->mixer.afilter, af_command);
+ }
+ build_afilter_chain(mpctx, sh_audio, &ao_data);
+ free(af_args);
+ }
+ break;
+ case MP_CMD_AF_CLR:
+ if (!sh_audio)
+ break;
+ af_uninit(mpctx->mixer.afilter);
+ af_init(mpctx->mixer.afilter);
+ build_afilter_chain(mpctx, sh_audio, &ao_data);
+ break;
default:
mp_msg(MSGT_CPLAYER, MSGL_V,
"Received unknown cmd %s\n", cmd->name);