diff options
author | wm4 <wm4@mplayer2.org> | 2012-02-10 19:03:24 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-02-10 19:14:19 +0100 |
commit | 489f61aa4c21a94e664632919577c91abdba89be (patch) | |
tree | d13294e72b812ea6ae138075b18dbe756aa50d2f /input | |
parent | 70bf6720963b912bceabb9ae691b5f2b79685b19 (diff) |
commands: add pt_clear command to clear playlist
This deletes all playlist elements, except the currently active
playlist entry.
NOTE: this doesn't remove parent nodes in the case when we really have
a play tree (as opposed to a play list). Apparently this doesn't cause
any harm.
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 1 | ||||
-rw-r--r-- | input/input.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c index a880a583d8..c6d5470bb5 100644 --- a/input/input.c +++ b/input/input.c @@ -184,6 +184,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT} } }, { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING}, {MP_CMD_ARG_INT} } }, { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING}, {MP_CMD_ARG_INT} } }, + { MP_CMD_PLAY_TREE_CLEAR, "pt_clear", 0 }, { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING} } }, { MP_CMD_CAPTURING, "capturing", 0 }, { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT}, {MP_CMD_ARG_INT} } }, diff --git a/input/input.h b/input/input.h index 99a69c7355..084e2dd3e7 100644 --- a/input/input.h +++ b/input/input.h @@ -50,6 +50,7 @@ enum mp_command_type { MP_CMD_MUTE, MP_CMD_LOADFILE, MP_CMD_LOADLIST, + MP_CMD_PLAY_TREE_CLEAR, MP_CMD_VF_CHANGE_RECTANGLE, MP_CMD_GAMMA, MP_CMD_SUB_VISIBILITY, |