[Mplayer-cvslog] CVS: main/input input.c,1.73,1.74
Alex Beregszaszi
alex at mplayerhq.hu
Fri May 30 20:23:59 CEST 2003
Update of /cvsroot/mplayer/main/input
In directory mail:/var/tmp.root/cvs-serv4990/input
Modified Files:
input.c
Log Message:
lirccd support by Fredrik Tolf <fredrik at dolda2000.cjb.net>
Index: input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- input.c 17 May 2003 09:21:21 -0000 1.73
+++ input.c 30 May 2003 18:23:55 -0000 1.74
@@ -33,6 +33,10 @@
#include "lirc.h"
#endif
+#ifdef HAVE_LIRCC
+#include <lirc/lircc.h>
+#endif
+
/// This array defines all know commands.
/// The first field is an id used to recognize the command without too many strcmp
/// The second is abviously the command name
@@ -381,7 +385,7 @@
static mp_cmd_t* ar_cmd = NULL;
static unsigned int ar_delay = 100, ar_rate = 8, last_ar = 0;
-static int use_joystick = 1, use_lirc = 1;
+static int use_joystick = 1, use_lirc = 1, use_lircc = 1;
static char* config_file = "input.conf";
static char* js_dev = NULL;
@@ -410,6 +414,8 @@
{ "joystick", &use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
{ "nolirc", &use_lirc, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL },
{ "lirc", &use_lirc, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
+ { "nolircc", &use_lircc, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL },
+ { "lircc", &use_lircc, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
{ NULL, NULL, 0, 0, 0, 0, NULL}
};
@@ -1478,6 +1484,14 @@
int fd = mp_input_lirc_init();
if(fd > 0)
mp_input_add_cmd_fd(fd,0,mp_input_lirc_read,mp_input_lirc_close);
+ }
+#endif
+
+#ifdef HAVE_LIRCC
+ if(use_lircc) {
+ int fd = lircc_init("mplayer", NULL);
+ if(fd >= 0)
+ mp_input_add_cmd_fd(fd,1,NULL,(mp_close_func_t)lircc_cleanup);
}
#endif
More information about the MPlayer-cvslog
mailing list