diff options
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 49 | ||||
-rw-r--r-- | input/input.h | 17 |
2 files changed, 0 insertions, 66 deletions
diff --git a/input/input.c b/input/input.c index 29b462a49f..7c02be5fa9 100644 --- a/input/input.c +++ b/input/input.c @@ -174,7 +174,6 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_SWITCH_RATIO, "switch_ratio", 0, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } }, { MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, { MP_CMD_VO_ONTOP, "vo_ontop", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, - { MP_CMD_FILE_FILTER, "file_filter", 1, { { MP_CMD_ARG_INT, {0}}, {-1,{0}}}}, { MP_CMD_VO_ROOTWIN, "vo_rootwin", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, { MP_CMD_VO_BORDER, "vo_border", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } }, { MP_CMD_SCREENSHOT, "screenshot", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, @@ -192,14 +191,6 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, #endif -#ifdef CONFIG_MENU - { MP_CMD_MENU, "menu",1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, - { MP_CMD_SET_MENU, "set_menu",1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, - { MP_CMD_CHELP, "help", 0, { {-1,{0}} } }, - { MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } }, - { MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } }, -#endif - { MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } }, { MP_CMD_GET_SUB_VISIBILITY, "get_sub_visibility", 0, { {-1,{0}} } }, { MP_CMD_KEYDOWN_EVENTS, "key_down_event", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, @@ -570,12 +561,6 @@ struct input_fd { int pos, size; }; -struct cmd_filter { - mp_input_cmd_filter filter; - void *ctx; - struct cmd_filter *next; -}; - struct cmd_bind_section { struct cmd_bind *cmd_binds; char *section; @@ -630,11 +615,6 @@ struct input_ctx { }; -static struct cmd_filter *cmd_filters = NULL; - -// Callback to allow the menu filter to grab the incoming keys -int (*mp_input_key_cb)(int code) = NULL; - int async_quit_request; static int print_key_list(m_option_t *cfg); @@ -1099,17 +1079,6 @@ static int default_cmd_func(int fd, char *buf, int l) } -void mp_input_add_cmd_filter(mp_input_cmd_filter func, void *ctx) -{ - struct cmd_filter *filter = talloc_ptrtype(NULL, filter); - - filter->filter = func; - filter->ctx = ctx; - filter->next = cmd_filters; - cmd_filters = filter; -} - - static char *find_bind_for_key(const struct cmd_bind *binds, int n, int *keys) { int j; @@ -1203,14 +1172,6 @@ static mp_cmd_t *interpret_key(struct input_ctx *ictx, int code) if (unmod < 256 && unmod != KEY_ENTER && unmod != KEY_TAB) code &= ~KEY_MODIFIER_SHIFT; - if (mp_input_key_cb) { - if (code & MP_KEY_DOWN) - return NULL; - code &= ~(MP_KEY_DOWN | MP_NO_REPEAT_KEY); - if (mp_input_key_cb(code)) - return NULL; - } - if (code & MP_KEY_DOWN) { if (ictx->num_key_down > MP_MAX_KEY_DOWN) { mp_tmsg(MSGT_INPUT, MSGL_ERR, "Too many key down events " @@ -1483,16 +1444,6 @@ mp_cmd_t *mp_input_get_cmd(struct input_ctx *ictx, int time, int peek_only) } else ret = queue->first; - for (struct cmd_filter *cf = cmd_filters; cf; cf = cf->next) { - if (cf->filter(ret, cf->ctx)) { - // The filter ate the cmd, so remove it from the queue - queue_pop(queue); - mp_cmd_free(ret); - // Retry with next command - return mp_input_get_cmd(ictx, 0, peek_only); - } - } - if (!peek_only) queue_pop(queue); diff --git a/input/input.h b/input/input.h index aaacfbe164..4058ce3d99 100644 --- a/input/input.h +++ b/input/input.h @@ -54,8 +54,6 @@ enum mp_command_type { MP_CMD_GAMMA, MP_CMD_SUB_VISIBILITY, MP_CMD_VOBSUB_LANG, // deprecated: combined with SUB_SELECT - MP_CMD_MENU, - MP_CMD_SET_MENU, MP_CMD_GET_TIME_LENGTH, MP_CMD_GET_PERCENT_POS, MP_CMD_SUB_STEP, @@ -96,7 +94,6 @@ enum mp_command_type { MP_CMD_OSD_SHOW_PROPERTY_TEXT, MP_CMD_OSD_SHOW_PROGRESSION, MP_CMD_SEEK_CHAPTER, - MP_CMD_FILE_FILTER, MP_CMD_GET_FILENAME, MP_CMD_GET_VIDEO_CODEC, MP_CMD_GET_VIDEO_BITRATE, @@ -147,11 +144,6 @@ enum mp_command_type { /// DVB commands MP_CMD_DVB_SET_CHANNEL = 5101, - /// Console commands - MP_CMD_CHELP = 7000, - MP_CMD_CEXIT, - MP_CMD_CHIDE, - /// Audio Filter commands MP_CMD_AF_SWITCH, MP_CMD_AF_ADD, @@ -207,11 +199,6 @@ typedef struct mp_cmd { } mp_cmd_t; -// Set this to grab all incoming key codes -extern int (*mp_input_key_cb)(int code); -// Should return 1 if the command was processed -typedef int (*mp_input_cmd_filter)(struct mp_cmd *cmd, void *ctx); - /* Add a new command input source. * "fd" is a file descriptor (use a negative value if you don't use any fd) * "select" tells whether to use select() on the fd to determine when to @@ -264,10 +251,6 @@ struct mp_cmd *mp_input_parse_cmd(char *str); */ int mp_input_parse_and_queue_cmds(struct input_ctx *ictx, const char *str); -// These filters allow you to process the command before MPlayer. -// If a filter returns a true value mp_input_get_cmd will return NULL. -void mp_input_add_cmd_filter(mp_input_cmd_filter, void *ctx); - // After getting a command from mp_input_get_cmd you need to free it using this // function void mp_cmd_free(struct mp_cmd *cmd); |