summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xine_frontend.c10
-rw-r--r--xine_frontend_lirc.c14
-rw-r--r--xine_frontend_main.c10
-rw-r--r--xine_sxfe_frontend.c5
4 files changed, 18 insertions, 21 deletions
diff --git a/xine_frontend.c b/xine_frontend.c
index 69387cf2..dbbf6650 100644
--- a/xine_frontend.c
+++ b/xine_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend.c,v 1.60 2008-06-16 11:36:49 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.61 2008-06-17 08:55:35 phintuka Exp $
*
*/
@@ -1198,17 +1198,17 @@ static int xine_queue_pes_packet(frontend_t *this_gen, const char *data, int len
#else /* #ifndef FE_STANDALONE */
-static void process_xine_keypress(input_plugin_t *input,
+static void process_xine_keypress(fe_t *this,
const char *map, const char *key,
int repeat, int release)
{
/* from UI --> input plugin --> vdr */
LOGDBG("Keypress: %s %s %s %s",
map, key, repeat?"Repeat":"", release?"Release":"");
- if(input) {
- vdr_input_plugin_t *input_vdr = (vdr_input_plugin_t *)input;
+ if(this->input || find_input(this)) {
+ vdr_input_plugin_t *input_vdr = (vdr_input_plugin_t *)this->input;
if(input_vdr->f.input_control) {
- input_vdr->f.input_control(input, map, key, repeat, release);
+ input_vdr->f.input_control(this->input, map, key, repeat, release);
} else {
LOGMSG("Keypress --- NO HANDLER SET");
}
diff --git a/xine_frontend_lirc.c b/xine_frontend_lirc.c
index a9c4e251..4fc51de7 100644
--- a/xine_frontend_lirc.c
+++ b/xine_frontend_lirc.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_lirc.c,v 1.10 2008-02-05 00:56:43 phintuka Exp $
+ * $Id: xine_frontend_lirc.c,v 1.11 2008-06-17 08:55:36 phintuka Exp $
*
*/
/*
@@ -20,7 +20,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: xine_frontend_lirc.c,v 1.10 2008-02-05 00:56:43 phintuka Exp $
+ * $Id: xine_frontend_lirc.c,v 1.11 2008-06-17 08:55:36 phintuka Exp $
*/
@@ -93,6 +93,7 @@ static void lircd_connect(void)
static void *lirc_receiver_thread(void *fe)
{
+ fe_t *this = (fe_t*)fe;
int timeout = -1;
uint64_t FirstTime = time_ms();
uint64_t LastTime = time_ms();
@@ -165,8 +166,7 @@ static void *lirc_receiver_thread(void *fe)
continue; /* skip keys coming in too fast */
if (repeat) {
alarm(3);
- if(find_input((fe_t*)fe))
- process_xine_keypress(((fe_t*)fe)->input, "LIRC", LastKeyName, 0, 1);
+ process_xine_keypress(this, "LIRC", LastKeyName, 0, 1);
alarm(0);
}
@@ -206,8 +206,7 @@ static void *lirc_receiver_thread(void *fe)
#endif
{
alarm(3);
- if(find_input((fe_t*)fe))
- process_xine_keypress(((fe_t*)fe)->input, "LIRC", KeyName, repeat, 0);
+ process_xine_keypress(this, "LIRC", KeyName, repeat, 0);
alarm(0);
}
@@ -215,8 +214,7 @@ static void *lirc_receiver_thread(void *fe)
else if (repeat) { /* the last one was a repeat, so let's generate a release */
if (elapsed(LastTime) >= REPEATTIMEOUT) {
alarm(3);
- if(find_input((fe_t*)fe))
- process_xine_keypress(((fe_t*)fe)->input, "LIRC", LastKeyName, 0, 1);
+ process_xine_keypress(this, "LIRC", LastKeyName, 0, 1);
alarm(0);
repeat = 0;
*LastKeyName = 0;
diff --git a/xine_frontend_main.c b/xine_frontend_main.c
index 5a653b81..0e12fa5a 100644
--- a/xine_frontend_main.c
+++ b/xine_frontend_main.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_main.c,v 1.42 2008-06-16 21:24:36 phintuka Exp $
+ * $Id: xine_frontend_main.c,v 1.43 2008-06-17 08:55:36 phintuka Exp $
*
*/
@@ -158,6 +158,7 @@ static void sxfe_toggle_fullscreen(sxfe_t *this);
static void *kbd_receiver_thread(void *fe)
{
+ fe_t *this = (fe_t*)fe;
uint64_t code = 0;
char str[64];
@@ -205,8 +206,7 @@ static void *kbd_receiver_thread(void *fe)
break;
snprintf(str, sizeof(str), "%016" PRIX64, code);
- if(find_input((fe_t*)fe))
- process_xine_keypress(((fe_t*)fe)->input, "KBD", str, 0, 0);
+ process_xine_keypress(this, "KBD", str, 0, 0);
} while(!terminate_key_pressed && code != 0xffff);
@@ -221,6 +221,7 @@ static void *kbd_receiver_thread(void *fe)
static void *slave_receiver_thread(void *fe)
{
+ fe_t *this = (fe_t*)fe;
char str[128], *pt;
terminate_key_pressed = 0;
@@ -253,8 +254,7 @@ static void *slave_receiver_thread(void *fe)
xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE, val ? 1 : 0);
} else if(!strncasecmp(str, "HITK ", 5)) {
- if(find_input((fe_t*)fe))
- process_xine_keypress(((fe_t*)fe)->input, NULL, str+5, 0, 0);
+ process_xine_keypress(this, NULL, str+5, 0, 0);
} else {
LOGMSG("Unknown slave mode command: %s", str);
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 0dd5b876..66e1cccc 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.61 2008-06-16 21:24:36 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.62 2008-06-17 08:55:35 phintuka Exp $
*
*/
@@ -1300,8 +1300,7 @@ static int XKeyEvent_handler(sxfe_t *this, XKeyEvent *kev)
#endif
default:
#ifdef FE_STANDALONE
- if(this->input || find_input(this))
- process_xine_keypress(this->input, "XKeySym", XKeysymToString(ks), 0, 0);
+ process_xine_keypress((fe_t*)this, "XKeySym", XKeysymToString(ks), 0, 0);
#else
if(this->keypress)
this->keypress("XKeySym", XKeysymToString(ks));