summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xine_fbfe_frontend.c8
-rw-r--r--xine_frontend.c4
-rw-r--r--xine_frontend_lirc.c13
-rw-r--r--xine_frontend_main.c24
-rw-r--r--xine_sxfe_frontend.c9
5 files changed, 25 insertions, 33 deletions
diff --git a/xine_fbfe_frontend.c b/xine_fbfe_frontend.c
index cc92a3aa..9259be83 100644
--- a/xine_fbfe_frontend.c
+++ b/xine_fbfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_fbfe_frontend.c,v 1.25 2008-06-17 15:15:44 phintuka Exp $
+ * $Id: xine_fbfe_frontend.c,v 1.26 2008-06-17 16:12:23 phintuka Exp $
*
*/
@@ -64,7 +64,8 @@ typedef struct fbfe_t {
/* function pointers */
frontend_t fe;
- void (*update_display_size)(frontend_t*);
+ void (*update_display_size)(struct fbfe_t*);
+ void (*toggle_fullscreen_state)(struct fbfe_t*);
/* vdr */
fe_keypress_f keypress;
@@ -119,9 +120,8 @@ typedef struct fbfe_t {
/* Common (non-X11/FB) frontend functions */
#include "xine_frontend.c"
-static void fbfe_update_display_size(frontend_t *this_gen)
+static void fbfe_update_display_size(fe_t *this)
{
- fe_t *this = (fe_t*)this_gen;
if(this->fullscreen) {
this->width = this->video_port->get_property(this->video_port,
VO_PROP_WINDOW_WIDTH);
diff --git a/xine_frontend.c b/xine_frontend.c
index faac3822..dbee01db 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.62 2008-06-17 15:15:44 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.63 2008-06-17 16:12:23 phintuka Exp $
*
*/
@@ -567,7 +567,7 @@ static int fe_xine_init(frontend_t *this_gen, const char *audio_driver,
/* re-configure display size (DirectFB driver changes display mode in init) */
if(this->update_display_size)
- this->update_display_size(this_gen);
+ this->update_display_size(this);
/* create audio port */
diff --git a/xine_frontend_lirc.c b/xine_frontend_lirc.c
index a0a0cc21..438e1b39 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.12 2008-06-17 15:43:13 phintuka Exp $
+ * $Id: xine_frontend_lirc.c,v 1.13 2008-06-17 16:12:23 phintuka Exp $
*
*/
/*
@@ -43,9 +43,6 @@ static volatile char *lirc_device_name = NULL;
static volatile int fd_lirc = -1;
static int lirc_repeat_emu = 0;
-#ifndef IS_FBFE
-static void sxfe_toggle_fullscreen(sxfe_t *this);
-#endif
static uint64_t time_ms()
{
@@ -192,13 +189,13 @@ static void *lirc_receiver_thread(void *fe)
if(!strcmp(KeyName, "Quit")) {
terminate_key_pressed = 1;
break;
-# ifndef IS_FBFE
+
} else if(!strcmp(KeyName, "Fullscreen")) {
if(!repeat)
- sxfe_toggle_fullscreen((sxfe_t*)fe);
-# endif
+ if(this->toggle_fullscreen_state)
+ this->toggle_fullscreen_state(this);
+
} else if(!strcmp(KeyName, "Deinterlace")) {
- fe_t *this = (fe_t*)fe;
xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE,
xine_get_param(this->stream, XINE_PARAM_VO_DEINTERLACE) ? 0 : 1);
} else
diff --git a/xine_frontend_main.c b/xine_frontend_main.c
index 0e12fa5a..6df991bb 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.43 2008-06-17 08:55:36 phintuka Exp $
+ * $Id: xine_frontend_main.c,v 1.44 2008-06-17 16:12:23 phintuka Exp $
*
*/
@@ -152,10 +152,6 @@ static uint64_t read_key_seq(void)
return k;
}
-#ifndef IS_FBFE
-static void sxfe_toggle_fullscreen(sxfe_t *this);
-#endif
-
static void *kbd_receiver_thread(void *fe)
{
fe_t *this = (fe_t*)fe;
@@ -189,14 +185,12 @@ static void *kbd_receiver_thread(void *fe)
break;
}
#if defined(XINELIBOUTPUT_FE_TOGGLE_FULLSCREEN) || defined(INTERPRET_LIRC_KEYS)
-# ifndef IS_FBFE
if(code == 'f' || code == 'F') {
- sxfe_toggle_fullscreen((sxfe_t*)fe);
- continue;
- } else
-# endif
- if(code == 'd' || code == 'D') {
- fe_t *this = (fe_t*)fe;
+ if(this->toggle_fullscreen_state) {
+ this->toggle_fullscreen_state(this);
+ continue;
+ }
+ } else if(code == 'd' || code == 'D') {
xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE,
xine_get_param(this->stream, XINE_PARAM_VO_DEINTERLACE) ? 0 : 1);
continue;
@@ -243,13 +237,11 @@ static void *slave_receiver_thread(void *fe)
if(!strncasecmp(str, "QUIT", 4)) {
break;
-#ifndef IS_FBFE
} else if(!strncasecmp(str, "FULLSCREEN", 10)) {
- sxfe_toggle_fullscreen((sxfe_t*)fe);
-#endif
+ if(this->toggle_fullscreen_state)
+ this->toggle_fullscreen_state(this);
} else if(!strncasecmp(str, "DEINTERLACE ", 12)) {
- fe_t *this = (fe_t*)fe;
int val = atoi(str+12);
xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE, val ? 1 : 0);
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 63451d25..11ff03de 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.63 2008-06-17 15:15:44 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.64 2008-06-17 16:12:23 phintuka Exp $
*
*/
@@ -113,7 +113,8 @@ typedef struct sxfe_s {
/* function pointers */
frontend_t fe;
- void (*update_display_size)(frontend_t*);
+ void (*update_display_size)(struct sxfe_s *);
+ void (*toggle_fullscreen_state)(struct sxfe_s *);
/* vdr */
fe_keypress_f keypress;
@@ -1227,7 +1228,7 @@ static int sxfe_display_config(frontend_t *this_gen,
return 1;
}
-static void sxfe_toggle_fullscreen(sxfe_t *this)
+static void sxfe_toggle_fullscreen(fe_t *this)
{
int force = this->fullscreen_state_forced;
this->fullscreen_state_forced = 0;
@@ -1633,6 +1634,8 @@ static frontend_t *sxfe_get_frontend(void)
this->fe.xine_queue_pes_packet = xine_queue_pes_packet;
#endif /*#ifndef FE_STANDALONE */
+ this->toggle_fullscreen_state = sxfe_toggle_fullscreen;
+
return (frontend_t*)this;
}