summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-30 18:23:55 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-30 18:23:55 +0000
commit019bae008cce2457ddb43a5fbc914e8a9214a2b3 (patch)
treee15d001f9b8a2b82ff6035befb1f678d8fe607a3 /input/input.c
parent0093c1e72b24757d97093591c53321df6f54905b (diff)
downloadmpv-019bae008cce2457ddb43a5fbc914e8a9214a2b3.tar.bz2
mpv-019bae008cce2457ddb43a5fbc914e8a9214a2b3.tar.xz
lirccd support by Fredrik Tolf <fredrik@dolda2000.cjb.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10216 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 059205a461..2eec96d356 100644
--- a/input/input.c
+++ b/input/input.c
@@ -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 short ar_state = -1;
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 @@ static config_t mp_input_opts[] = {
{ "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}
};
@@ -1481,6 +1487,14 @@ mp_input_init(void) {
}
#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
+
if(in_file) {
struct stat st;
if(stat(in_file,&st))