Mercurial > mplayer.hg
changeset 16227:4b2b8c90d370
loadfile/loadlist can now also add files to the playlist
author | reimar |
---|---|
date | Mon, 15 Aug 2005 08:30:43 +0000 |
parents | 94bb243636e1 |
children | 88ed8890152c |
files | DOCS/tech/slave.txt input/input.c mplayer.c |
diffstat | 3 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/tech/slave.txt Sun Aug 14 23:16:17 2005 +0000 +++ b/DOCS/tech/slave.txt Mon Aug 15 08:30:43 2005 +0000 @@ -173,11 +173,15 @@ If <absolute> is != 0, then the pan-and scan range is interpreted as an absolute range. -loadfile <file|url> +loadfile <file|url> <append> Load the given file/URL. + If <append> is 0 or not given playback of the current file will be stopped + and the playlist replaced. Otherwise it will only be added to the playlist. -loadlist <file> +loadlist <file> <append> Load the given playlist file. + If <append> is 0 or not given playback of the current file will be stopped + and the playlist replaced. Otherwise it will only be added to the playlist. change_rectangle <val1> <val2> Change the position of the rectangle filter rectangle.
--- a/input/input.c Sun Aug 14 23:16:17 2005 +0000 +++ b/input/input.c Mon Aug 15 08:30:43 2005 +0000 @@ -110,8 +110,8 @@ { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } }, { MP_CMD_PANSCAN, "panscan",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, - { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, - { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, + { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, + { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
--- a/mplayer.c Sun Aug 14 23:16:17 2005 +0000 +++ b/mplayer.c Mon Aug 15 08:30:43 2005 +0000 @@ -2998,6 +2998,9 @@ play_tree_t* e = play_tree_new(); play_tree_add_file(e,cmd->args[0].v.s); + if (cmd->args[1].v.i) // append + play_tree_append_entry(playtree, e); + else { // Go back to the start point while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END) /* NOP */; @@ -3005,6 +3008,7 @@ play_tree_set_child(playtree,e); play_tree_iter_step(playtree_iter,0,0); eof = PT_NEXT_SRC; + } brk_cmd = 1; } break; case MP_CMD_LOADLIST : { @@ -3012,6 +3016,9 @@ if(!e) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_PlaylistLoadUnable,cmd->args[0].v.s); else { + if (cmd->args[1].v.i) // append + play_tree_append_entry(playtree, e); + else { // Go back to the start point while(play_tree_iter_up_step(playtree_iter,0,1) != PLAY_TREE_ITER_END) /* NOP */; @@ -3019,6 +3026,7 @@ play_tree_set_child(playtree,e); play_tree_iter_step(playtree_iter,0,0); eof = PT_NEXT_SRC; + } } brk_cmd = 1; } break;