[MPlayer-cvslog] r32505 - in trunk: DOCS/tech/slave.txt command.c input/input.c input/input.h
reimar
subversion at mplayerhq.hu
Sun Oct 17 17:54:55 CEST 2010
Author: reimar
Date: Sun Oct 17 17:54:55 2010
New Revision: 32505
Log:
Add experimental af_cmdline slave command to allow changing filter options at runtime.
Modified:
trunk/DOCS/tech/slave.txt
trunk/command.c
trunk/input/input.c
trunk/input/input.h
Modified: trunk/DOCS/tech/slave.txt
==============================================================================
--- trunk/DOCS/tech/slave.txt Sun Oct 17 17:52:18 2010 (r32504)
+++ trunk/DOCS/tech/slave.txt Sun Oct 17 17:54:55 2010 (r32505)
@@ -53,6 +53,9 @@ af_add <filter_arguments_list> (comma s
af_clr
(experimental) Unload all loaded audio filters.
+af_cmdline <filter_name> <filter_arguments>
+ (experimental) Send new command-line options to a filter with the given name.
+
af_del <filter_name_list> (comma separated list of audio filter's names)
(experimental) Unload the first occurrence of the filters, if loaded.
Modified: trunk/command.c
==============================================================================
--- trunk/command.c Sun Oct 17 17:52:18 2010 (r32504)
+++ trunk/command.c Sun Oct 17 17:54:55 2010 (r32505)
@@ -3432,6 +3432,19 @@ int run_command(MPContext *mpctx, mp_cmd
af_init(mpctx->mixer.afilter);
build_afilter_chain(sh_audio, &ao_data);
break;
+ case MP_CMD_AF_CMDLINE:
+ if (sh_audio) {
+ af_instance_t *af = af_get(sh_audio->afilter, cmd->args[0].v.s);
+ if (!af) {
+ mp_msg(MSGT_CPLAYER, MSGL_WARN,
+ "Filter '%s' not found in chain.\n", cmd->args[0].v.s);
+ break;
+ }
+ af->control(af, AF_CONTROL_COMMAND_LINE, cmd->args[1].v.s);
+ af_reinit(sh_audio->afilter, af);
+ }
+ break;
+
default:
mp_msg(MSGT_CPLAYER, MSGL_V,
"Received unknown cmd %s\n", cmd->name);
Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c Sun Oct 17 17:52:18 2010 (r32504)
+++ trunk/input/input.c Sun Oct 17 17:54:55 2010 (r32505)
@@ -205,6 +205,7 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_AF_ADD, "af_add", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_AF_DEL, "af_del", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_AF_CLR, "af_clr", 0, { {-1,{0}} } },
+ { MP_CMD_AF_CMDLINE, "af_cmdline", 2, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ 0, NULL, 0, {} }
};
Modified: trunk/input/input.h
==============================================================================
--- trunk/input/input.h Sun Oct 17 17:52:18 2010 (r32504)
+++ trunk/input/input.h Sun Oct 17 17:54:55 2010 (r32505)
@@ -159,6 +159,7 @@ typedef enum {
MP_CMD_AF_ADD,
MP_CMD_AF_DEL,
MP_CMD_AF_CLR,
+ MP_CMD_AF_CMDLINE,
} mp_command_type;
More information about the MPlayer-cvslog
mailing list