From e46ac635c2c28d80706f02f239bb847c7e48c34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 27 Aug 2004 19:33:17 +0000 Subject: MINGW32 port. Engine library and most of plugins compiles now. List of some changes: - replaced some _MSC_VER by more common WIN32 - define INTLDIR, remove -static flag for included intl - shared more common CFLAGS with DEBUG_CFLAGS - use WIN32_CFLAGS for all building - separate some flags into THREAD_CFLAGS_CONFIG, THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, automatically use internal libs if necessary - don't warn about missing X for mingw and cygwin - libw32dll disabled for WIN32 (making native loader would be interesting, or porting wine code to Windows? :->) - DVB and RTP disabled for WIN32, not ported yet - fix build and fix a warning in cdda - fix build for nosefart and libfaad - implement configure option --disable-freetype - sync libxine.pc and xine-config.in - add -liberty to goom under WIN32 - move original build files from included phread and zlib into archives and replace them by autotools CVS patchset: 6910 CVS date: 2004/08/27 19:33:17 --- src/input/Makefile.am | 10 ++++++++-- src/input/input_cdda.c | 29 +++++++++++++++++------------ src/input/libreal/Makefile.am | 2 +- src/input/librtsp/Makefile.am | 2 +- src/input/media_helper.c | 4 ++++ 5 files changed, 31 insertions(+), 16 deletions(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 35672d934..04c418a15 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -44,6 +44,12 @@ DVD_CFLAGS = -I$(top_srcdir)/src/input/libdvdnav/ link_dvdnav = libdvdnav/libdvdnav.la endif +# not ported to native Windows +if !WIN32 +in_rtp = xineplug_inp_rtp.la +in_dvb = xineplug_inp_dvb.la +endif + AM_CFLAGS = -D_LARGEFILE64_SOURCE $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) lib_LTLIBRARIES = \ @@ -56,11 +62,11 @@ lib_LTLIBRARIES = \ xineplug_inp_mms.la \ xineplug_inp_stdin_fifo.la \ xineplug_inp_pnm.la \ - xineplug_inp_rtp.la \ + $(in_rtp) \ xineplug_inp_rtsp.la \ xineplug_inp_net.la \ $(in_pvr) \ - xineplug_inp_dvb.la \ + $(in_dvb) \ xineplug_inp_cdda.la diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 4b3c40d92..43c5f98c0 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.63 2004/07/27 18:06:45 mroi Exp $ + * $Id: input_cdda.c,v 1.64 2004/08/27 19:33:20 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -37,11 +37,17 @@ #include #include -#ifndef _MSC_VER -#include -#include +#ifdef HAVE_SYS_IOCTL_H +# include #else -#include /* alarm() */ +/* for WIN32 */ +# include +#endif + +#include + +#ifdef _MSC_VER +# include /* alarm() */ #endif /* _MSC_VER */ #include @@ -61,10 +67,6 @@ #include "input_plugin.h" #include "media_helper.h" -#ifdef WIN32 -#include -#endif - #if defined(__sun) #define DEFAULT_CDDA_DEVICE "/vol/dev/aliases/cdrom0" #elif defined(WIN32) @@ -942,6 +944,7 @@ static int network_command( xine_stream_t *stream, int socket, char *data_buf, c } +#ifndef WIN32 static int network_connect(xine_stream_t *stream, char *url ) { char *host; @@ -970,7 +973,7 @@ static int network_connect(xine_stream_t *stream, char *url ) } return fd; } - + static int network_read_cdrom_toc(xine_stream_t *stream, int fd, cdrom_toc *toc) { char buf[_BUFSIZ]; @@ -1033,6 +1036,8 @@ static int network_read_cdrom_toc(xine_stream_t *stream, int fd, cdrom_toc *toc) return 0; } +#endif /* WIN32 */ + static int network_read_cdrom_frames(xine_stream_t *stream, int fd, int first_frame, int num_frames, unsigned char data[CD_RAW_FRAME_SIZE]) { @@ -1812,9 +1817,8 @@ static int cdda_open(cdda_input_plugin_t *this_gen, int fd = -1; - if ( !cdda_device ) return -1; - #ifndef WIN32 + if ( !cdda_device ) return -1; *fdd = -1; @@ -1846,6 +1850,7 @@ static int cdda_open(cdda_input_plugin_t *this_gen, return 0; #else /* WIN32 */ + if ( !cdda_device ) return -1; *fdd = -1; diff --git a/src/input/libreal/Makefile.am b/src/input/libreal/Makefile.am index 8dd4a9258..57928e26c 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -10,7 +10,7 @@ libreal_la_SOURCES = \ rmff.c \ sdpplin.c -libreal_la_LDFLAGS = $(THREAD_LIBS) -avoid-version -module +libreal_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ real.h \ diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am index 096d47182..2207482b6 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -8,7 +8,7 @@ librtsp_la_SOURCES = \ rtsp.c \ rtsp_session.c -librtsp_la_LDFLAGS = $(THREAD_LIBS) -avoid-version -module +librtsp_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ rtsp.h \ diff --git a/src/input/media_helper.c b/src/input/media_helper.c index 3a016b12f..d07acbab6 100644 --- a/src/input/media_helper.c +++ b/src/input/media_helper.c @@ -53,6 +53,7 @@ static int media_umount_media(const char *device) { +#ifndef WIN32 pid_t pid; int status; @@ -72,6 +73,9 @@ static int media_umount_media(const char *device) } while(1); return -1; +#else + return 0; +#endif } int media_eject_media (xine_t *xine, const char *device) -- cgit v1.2.3