Mercurial > mplayer.hg
changeset 10215:dd32fe16a36c
lirccd support by Fredrik Tolf <fredrik@dolda2000.cjb.net>
author | alex |
---|---|
date | Fri, 30 May 2003 18:23:55 +0000 |
parents | e2c83c931fa6 |
children | d608097901b1 |
files | Makefile configure input/input.c |
diffstat | 3 files changed, 46 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri May 30 18:17:58 2003 +0000 +++ b/Makefile Fri May 30 18:23:55 2003 +0000 @@ -204,7 +204,7 @@ $(PRG): $(MPLAYER_DEP) ./darwinfixlib.sh $(MPLAYER_DEP) - $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm + $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm mplayer.exe.spec.c: libmpcodecs/libmpcodecs.a winebuild -fPIC -o mplayer.exe.spec.c -exe mplayer.exe -mcui \ @@ -212,11 +212,11 @@ -L/usr/local/lib/wine -lkernel32 mplayer.exe.so: $(MPLAYER_DEP) mplayer.exe.spec.c - $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine -lm + $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine -lm mplayer_wine.so: $(MPLAYER_DEP) ./darwinfixlib.sh $(MPLAYER_DEP) - $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) -lm + $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) -lm $(PRG_FIBMAP): fibmap_mplayer.o $(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o @@ -224,7 +224,7 @@ ifeq ($(MENCODER),yes) $(PRG_MENCODER): $(MENCODER_DEP) ./darwinfixlib.sh $(MENCODER_DEP) libmpcodecs/libmpencoders.a - $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm + $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm endif codecs.conf.h: $(PRG_CFG)
--- a/configure Fri May 30 18:17:58 2003 +0000 +++ b/configure Fri May 30 18:23:55 2003 +0000 @@ -147,6 +147,7 @@ --disable-iconv do not use iconv(3) function [autodetect] --disable-setlocale disable setlocale using in mplayer [autodetect] --enable-lirc enable LIRC (remote control) support [autodetect] + --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect] --enable-joystick enable joystick support [disable] --disable-tv disable TV Interface (tv/dvb grabbers) [enable] --disable-tv-v4l disable Video4Linux TV Interface support [autodetect] @@ -1064,6 +1065,7 @@ _divx4linux=auto _opendivx=no _lirc=auto +_lircc=auto _gui=no _termcap=auto _termios=auto @@ -1249,6 +1251,8 @@ --disable-libfame) _fame=no ;; --enable-lirc) _lirc=yes ;; --disable-lirc) _lirc=no ;; + --enable-lircc) _lircc=yes ;; + --disable-lircc) _lircc=no ;; --enable-gui) _gui=yes ;; --disable-gui) _gui=no ;; --enable-termcap) _termcap=yes ;; @@ -5195,6 +5199,22 @@ fi echores "$_lirc" +echocheck "lircc" +if test "$_lircc" = auto ; then + _lircc=no + cat > $TMPC <<EOF +#include <lirc/lircc.h> +int main(void) { return 0; } +EOF + cc_check -llircc && _lircc=yes +fi +if test "$_lircc" = yes ; then + _def_lircc='#define HAVE_LIRCC 1' + _ld_lircc='-llircc' +else + _def_lircc='#undef HAVE_LIRCC' +fi +echores "$_lircc" ############################################################################# echo "Creating config.mak" @@ -5282,6 +5302,7 @@ # input/demuxer/codecs TERMCAP_LIB = $_ld_termcap LIRC_LIB = $_ld_lirc +LIRCC_LIB = $_ld_lircc CSS_USE = $_css CSS_LIB = $_ld_css DVDKIT = $_dvdkit @@ -5534,6 +5555,12 @@ /* LIRC (remote control, see www.lirc.org) support: */ $_def_lirc +/* + * LIRCCD (LIRC client daemon) + * See http://www.dolda2000.cjb.net/~fredrik/lirccd/ + */ +$_def_lircc + /* DeCSS support using libcss */ $_def_css
--- a/input/input.c Fri May 30 18:17:58 2003 +0000 +++ b/input/input.c Fri May 30 18:23:55 2003 +0000 @@ -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} }; @@ -1481,6 +1487,14 @@ } #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))