diff options
author | Matthias Hopf <mat@mshopf.de> | 2001-07-16 19:36:00 +0000 |
---|---|---|
committer | Matthias Hopf <mat@mshopf.de> | 2001-07-16 19:36:00 +0000 |
commit | 0bb6f834ae95cd434110ab1612563994112d75ac (patch) | |
tree | 2cc2b29482da412356c3c8cab8474879d66f47f8 /src/input | |
parent | 65d473e411929996584d8841790a9e583db6781d (diff) | |
download | xine-lib-0bb6f834ae95cd434110ab1612563994112d75ac.tar.gz xine-lib-0bb6f834ae95cd434110ab1612563994112d75ac.tar.bz2 |
IRIX / mips port. Audio and CD support are not implemented yet.
Nuked BUILD_LIB_STATIC.
Changed some architecture dependend code to feature dependend code.
Autoconf'ing CD / DVD ioctl() support.
CVS patchset: 288
CVS date: 2001/07/16 19:36:00
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/Makefile.am | 11 | ||||
-rw-r--r-- | src/input/input_dvd.c | 41 | ||||
-rw-r--r-- | src/input/input_rtp.c | 4 | ||||
-rw-r--r-- | src/input/input_vcd.c | 25 |
4 files changed, 47 insertions, 34 deletions
diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 02ff88580..12d21c62b 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -14,9 +14,15 @@ libdir = $(XINE_PLUGINDIR) # --------- # All of xine input plugins should be named like the scheme "xineplug_inp_" # -lib_LTLIBRARIES = xineplug_inp_file.la xineplug_inp_dvd.la \ + +if HAVE_CDROM_IOCTLS +in_dvd = xineplug_inp_dvd.la +in_vcd = xineplug_inp_vcd.la +endif + +lib_LTLIBRARIES = xineplug_inp_file.la $(in_dvd) $(in_vcd) \ xineplug_inp_stdin_fifo.la xineplug_inp_net.la \ - xineplug_inp_vcd.la xineplug_inp_rtp.la + xineplug_inp_rtp.la xineplug_inp_file_la_SOURCES = input_file.c xineplug_inp_file_la_LDFLAGS = -avoid-version -module @@ -38,6 +44,7 @@ xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module include_HEADERS = input_plugin.h noinst_HEADERS = dvd_udf.h +EXTRA_DIST = input_dvd.c dvd_udf.c input_vcd.c ## diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index b3aa850a8..bbd302ca4 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.13 2001/07/10 21:07:55 f1rmb Exp $ + * $Id: input_dvd.c,v 1.14 2001/07/16 19:36:00 mshopf Exp $ */ #ifdef HAVE_CONFIG_H @@ -27,15 +27,6 @@ #include <dlfcn.h> #include <stdio.h> #include <fcntl.h> -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) \ - || defined(__sun) -# include <sys/cdio.h> -#elif defined(__linux__) -#include <linux/config.h> /* Check for DEVFS */ -# include <linux/cdrom.h> -#else -# error "Need the DVD ioctls" -#endif #include <sys/ioctl.h> #include <errno.h> #include <unistd.h> @@ -43,6 +34,17 @@ #include <string.h> #include <inttypes.h> +#ifdef HAVE_SYS_CDIO_H +# include <sys/cdio.h> +#endif +#ifdef HAVE_LINUX_CDROM_H +# include <linux/config.h> /* Check for DEVFS */ +# include <linux/cdrom.h> +#endif +#if ! defined (HAVE_LINUX_CDROM_H) && ! defined (HAVE_SYS_CDIO) +#error "you need to add cdrom / VCD support for your platform to input_vcd and configure.in" +#endif + #include "xine_internal.h" #include "monitor.h" #include "input_plugin.h" @@ -348,7 +350,7 @@ static int dvd_plugin_eject_media (input_plugin_t *this_gen) { if((fd = open(DVD, O_RDONLY|O_NONBLOCK)) > -1) { -#if defined (__linux__) +#if defined (HAVE_LINUX_CDROM_H) if((status = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)) > 0) { switch(status) { case CDS_TRAY_OPEN: @@ -371,8 +373,15 @@ static int dvd_plugin_eject_media (input_plugin_t *this_gen) { return 0; } -#elif defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__) +#elif defined (HAVE_CDIO_H) +# if defined (__sun) + status = 0; + if ((ret = ioctl(fd, CDROMEJECT)) != 0) { + xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno)); + } + +# else if (ioctl(fd, CDIOCALLOW) == -1) { perror("ioctl(cdromallow)"); } else { @@ -380,13 +389,7 @@ static int dvd_plugin_eject_media (input_plugin_t *this_gen) { perror("ioctl(cdromeject)"); } } - -#elif defined(__sun) - - status = 0; - if ((ret = ioctl(fd, CDROMEJECT)) != 0) { - xprintf(VERBOSE|INPUT, "CDROMEJECT failed: %s\n", strerror(errno)); - } +# endif #endif diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index d46ba2058..b18082609 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -147,13 +147,13 @@ static int host_connect_attempt(struct in_addr ia, int port) { } /* multicast ? */ if ((ntohl(sin.sin_addr.s_addr) >> 28) == 0xe) { -#if defined (__linux__) +#ifdef HAVE_IP_MREQN struct ip_mreqn mreqn; mreqn.imr_multiaddr.s_addr = sin.sin_addr.s_addr; mreqn.imr_address.s_addr = INADDR_ANY; mreqn.imr_ifindex = 0; -#elif defined (__FreeBSD__) || defined(__sun) +#else struct ip_mreq mreqn; mreqn.imr_multiaddr.s_addr = sin.sin_addr.s_addr; diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index ee1ea378e..89e08eee0 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.13 2001/07/10 21:07:55 f1rmb Exp $ + * $Id: input_vcd.c,v 1.14 2001/07/16 19:36:00 mshopf Exp $ */ #ifdef HAVE_CONFIG_H @@ -32,16 +32,19 @@ #include <fcntl.h> #include <sys/ioctl.h> #include <string.h> -#if defined (__linux__) -#include <linux/config.h> /* Check for DEVFS */ -#include <linux/cdrom.h> -#elif defined (__FreeBSD__) -#include <sys/cdio.h> -#include <sys/cdrio.h> -#elif defined (__sun) -#include <sys/cdio.h> -#else -#error "you need to add cdrom / VCD support for your platform to input_vcd" +#ifdef HAVE_LINUX_CDROM_H +# include <linux/config.h> /* Check for DEVFS */ +# include <linux/cdrom.h> +#endif +#ifdef HAVE_SYS_CDIO_H +# include <sys/cdio.h> +/* TODO: not clean yet */ +# if defined (__FreeBSD__) +# include <sys/cdrio.h> +# endif +#endif +#if ! defined (HAVE_LINUX_CDROM_H) && ! defined (HAVE_SYS_CDIO) +#error "you need to add cdrom / VCD support for your platform to input_vcd and configure.in" #endif #include "xine_internal.h" |