diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_dvd.c | 32 | ||||
-rw-r--r-- | src/input/input_file.c | 15 | ||||
-rw-r--r-- | src/input/libdvdnav/dvdnav.h | 7 | ||||
-rw-r--r-- | src/input/libdvdread/bswap.h | 2 | ||||
-rw-r--r-- | src/input/libdvdread/dvd_reader.h | 4 |
5 files changed, 51 insertions, 9 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index f50253b72..43803e605 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,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.152 2003/04/13 16:02:53 tmattern Exp $ + * $Id: input_dvd.c,v 1.153 2003/04/22 23:30:29 tchamp Exp $ * */ @@ -40,10 +40,14 @@ #include <stdio.h> #include <stdlib.h> #include <stddef.h> + +#ifndef _MSC_VER #include <dirent.h> #include <sys/param.h> #include <sys/types.h> #include <sys/stat.h> +#endif /* _MSC_VER */ + #include <unistd.h> #include <fcntl.h> #include <time.h> @@ -51,11 +55,14 @@ #include <errno.h> #include <dlfcn.h> +#ifndef _MSC_VER #include <sys/mount.h> #include <sys/wait.h> #include <sys/poll.h> #include <sys/ioctl.h> +#endif /* _MSC_VER */ + #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) #include <sys/dvdio.h> @@ -65,13 +72,23 @@ #elif defined(HAVE_SYS_CDIO_H) #include <sys/cdio.h> #else + +#ifdef WIN32 +#include <io.h> /* read() */ +#else #warning "This might not compile due to missing cdrom ioctls" +#endif /* WIN32 */ + #endif /* DVDNAV includes */ #ifdef HAVE_DVDNAV +#ifndef _MSC_VER # include <dvdnav/dvdnav.h> #else +# include "dvdnav.h" +#endif /* _MSC_VER */ +#else # define DVDNAV_COMPILE # include "dvdnav.h" #endif @@ -125,11 +142,11 @@ # define trace_print(s, args...) /* Nothing */ # endif #else -# ifdef INPUT_DEBUG_TRACE -# define trace_print(s, ...) printf("input_dvd: " __func__ ": " s, __VA_ARGS_); -# else -# define trace_print(s, ...) /* Nothing */ -# endif +# ifndef _MSC_VER +# define trace_print(s, ...) /* Nothing */ +# else +# define trace_print printf +# endif /* _MSC_VER */ #endif /* Array to hold MRLs returned by get_autoplay_list */ @@ -1604,6 +1621,9 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.153 2003/04/22 23:30:29 tchamp + * Additional changes for win32/msvc port; This is my first real commit so please be gentle with me; Everything builds except for the win32 ui + * * Revision 1.152 2003/04/13 16:02:53 tmattern * Input plugin api change: * old open() function replaced by : diff --git a/src/input/input_file.c b/src/input/input_file.c index 3356d6b31..612546ddf 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.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_file.c,v 1.79 2003/04/13 16:02:53 tmattern Exp $ + * $Id: input_file.c,v 1.80 2003/04/22 23:30:35 tchamp Exp $ */ #ifdef HAVE_CONFIG_H @@ -75,6 +75,10 @@ static uint32_t file_plugin_get_capabilities (input_plugin_t *this_gen) { if (this->fh <0) return 0; +#ifdef _MSC_VER + /*return INPUT_CAP_SEEKABLE | INPUT_CAP_GET_DIR;*/ + return INPUT_CAP_SEEKABLE; +#else if (fstat (this->fh, &buf) == 0) { if (S_ISREG(buf.st_mode)) return INPUT_CAP_SEEKABLE; @@ -83,6 +87,7 @@ static uint32_t file_plugin_get_capabilities (input_plugin_t *this_gen) { } else perror ("system call fstat"); return 0; +#endif /* _MSC_VER */ } @@ -231,7 +236,15 @@ static int file_plugin_open (input_plugin_t *this_gen ) { else filename = decode_uri(this->mrl); +#ifdef _MSC_VER + /* + added O_BINARY flag, <CTRL>-Z char + is interperated as EOF on win32. + */ + this->fh = open (filename, O_RDONLY|O_BINARY); +#else this->fh = open (filename, O_RDONLY); +#endif /* _MSC_VER */ if (this->fh == -1) { return 0; diff --git a/src/input/libdvdnav/dvdnav.h b/src/input/libdvdnav/dvdnav.h index fa210ea53..44ef878e1 100644 --- a/src/input/libdvdnav/dvdnav.h +++ b/src/input/libdvdnav/dvdnav.h @@ -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: dvdnav.h,v 1.10 2003/04/07 19:59:09 jcdutton Exp $ + * $Id: dvdnav.h,v 1.11 2003/04/22 23:30:36 tchamp Exp $ * */ @@ -34,11 +34,16 @@ extern "C" { #endif #ifdef HAVE_DVDNAV +#ifndef _MSC_VER # include <dvdnav/dvdnav_events.h> # include <dvdnav/dvd_types.h> #else # include "dvdnav_events.h" # include "dvd_types.h" +#endif /* _MSC_VER */ +#else +# include "dvdnav_events.h" +# include "dvd_types.h" #endif #include "dvd_reader.h" diff --git a/src/input/libdvdread/bswap.h b/src/input/libdvdread/bswap.h index 9c7402957..6eb9e37f2 100644 --- a/src/input/libdvdread/bswap.h +++ b/src/input/libdvdread/bswap.h @@ -65,7 +65,7 @@ * functionality! */ -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) +#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(_MSC_VER) #define B2N_16(x) \ x = ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)) diff --git a/src/input/libdvdread/dvd_reader.h b/src/input/libdvdread/dvd_reader.h index cc4ba5489..9f609dfd8 100644 --- a/src/input/libdvdread/dvd_reader.h +++ b/src/input/libdvdread/dvd_reader.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#if defined(_MSC_VER) +typedef long ssize_t; +#endif /* _MSC_VER */ + #include <sys/types.h> /** |