diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | src/audio_out/audio_directx_out.c | 34 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 6 | ||||
-rw-r--r-- | src/input/input_cdda.c | 9 | ||||
-rw-r--r-- | src/input/input_file.c | 4 | ||||
-rw-r--r-- | src/input/media_helper.c | 6 | ||||
-rwxr-xr-x | src/video_out/video_out_directx.c | 17 | ||||
-rw-r--r-- | src/xine-engine/io_helper.c | 4 | ||||
-rw-r--r-- | src/xine-engine/osd.c | 2 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 5 | ||||
-rw-r--r-- | win32/include/unistd.h | 11 |
11 files changed, 48 insertions, 52 deletions
diff --git a/configure.ac b/configure.ac index f1db75684..58f051e3c 100644 --- a/configure.ac +++ b/configure.ac @@ -1627,7 +1627,7 @@ case "$host_or_hostalias" in ;; *-*-cygwin) enable_w32dll="no" - LIBS="$LIBS @INTLLIBS@" + LIBS="$LIBS @INTLLIBS@ -lkernel32" ;; esac else diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index 688f1628b..90327d677 100755 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -20,7 +20,7 @@ * audio_directx_out.c, direct sound audio output plugin for xine * by Matthew Grooms <elon@altavista.com> * - * $Id: audio_directx_out.c,v 1.11 2004/04/10 14:53:43 mroi Exp $ + * $Id: audio_directx_out.c,v 1.12 2004/09/02 19:56:40 valtri Exp $ */ /* @@ -119,11 +119,12 @@ typedef struct { * * ------------------------------------------- */ -boolean CreateDirectSound( ao_directx_t * ao_directx ); -void DestroyDirectSound( ao_directx_t * ao_directx ); -boolean CreateSoundBuffer( ao_directx_t * ao_directx ); -void DestroySoundBuffer( ao_directx_t * ao_directx ); -uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * samples ); +void Error( HWND hwnd, LPSTR szfmt, ... ); +boolean CreateDirectSound( ao_directx_t * ao_directx ); +void DestroyDirectSound( ao_directx_t * ao_directx ); +boolean CreateSoundBuffer( ao_directx_t * ao_directx ); +void DestroySoundBuffer( ao_directx_t * ao_directx ); +uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * samples ); /* Display formatted error message in * popup message box. */ @@ -370,10 +371,10 @@ void DestroySoundBuffer( ao_directx_t * ao_directx ) uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * samples ) { - uint8_t * buff_pointer; /* pointer inside circular buffer */ - uint32_t buff_length; /* bytes locked by pointer */ - uint32_t half_size; /* half our sound buffer size */ - uint32_t result; /* error result */ + uint8_t * buff_pointer; /* pointer inside circular buffer */ + DWORD buff_length; /* bytes locked by pointer */ + uint32_t half_size; /* half our sound buffer size */ + uint32_t result; /* error result */ #ifdef LOG if ((void*)samples != (void*)0) @@ -396,8 +397,8 @@ uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * s result = IDirectSoundBuffer_Lock( ao_directx->dsbuffer, 0, 0, - &buff_pointer, &buff_length, - 0, 0, DSBLOCK_ENTIREBUFFER ); + (LPVOID *)&buff_pointer, &buff_length, + NULL, 0, DSBLOCK_ENTIREBUFFER ); if( result != DS_OK ) { Error( 0, "IDirectSoundBuffer_Lock : could not lock sound buffer" ); @@ -439,7 +440,7 @@ uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * s result = IDirectSoundBuffer_Lock( ao_directx->dsbuffer, 0, half_size, - &buff_pointer, &buff_length, + (LPVOID *)&buff_pointer, &buff_length, 0, 0, 0 ); if( result != DS_OK ) { @@ -473,7 +474,7 @@ uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * s result = IDirectSoundBuffer_Lock( ao_directx->dsbuffer, half_size, half_size, - &buff_pointer, &buff_length, + (LPVOID *)&buff_pointer, &buff_length, 0, 0, 0 ); if( result != DS_OK ) { @@ -509,8 +510,6 @@ uint32_t FillSoundBuffer( ao_directx_t * ao_directx, int code, unsigned char * s * ----------------------------------------- */ static int ao_directx_control(ao_driver_t *this_gen, int cmd, ...) { - ao_directx_t *ao_directx = ( ao_directx_t * ) this_gen; - switch (cmd) { @@ -594,7 +593,6 @@ static int ao_directx_bytes_per_frame( ao_driver_t * ao_driver ) static int ao_directx_get_gap_tolerance( ao_driver_t * ao_driver ) { - ao_directx_t *ao_directx = ( ao_directx_t * ) ao_driver; return 5000; } @@ -710,7 +708,6 @@ static void ao_directx_close( ao_driver_t * ao_driver ) static uint32_t ao_directx_get_capabilities( ao_driver_t * ao_driver ) { - ao_directx_t *ao_directx = ( ao_directx_t * ) ao_driver; return AO_CAP_MODE_STEREO | AO_CAP_MIXER_VOL | AO_CAP_PCM_VOL | AO_CAP_MUTE_VOL; } @@ -739,7 +736,6 @@ static void ao_directx_exit( ao_driver_t * ao_driver ) static int ao_directx_get_property( ao_driver_t * ao_driver, int property ) { - ao_directx_t *ao_directx = ( ao_directx_t * ) ao_driver; return 0; } diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 4f48b40c3..8a919ae8e 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.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: demux_asf.c,v 1.161 2004/06/13 21:28:52 miguelfreitas Exp $ + * $Id: demux_asf.c,v 1.162 2004/09/02 19:56:41 valtri Exp $ * * demultiplexer for asf streams * @@ -255,8 +255,8 @@ static int get_guid_id (demux_asf_t *this, GUID g) { } xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_asf: unknown GUID: 0x%x, 0x%x, 0x%x, " - "{ 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx }\n", + "demux_asf: unknown GUID: 0x%" PRIx32 ", 0x%" PRIx16 ", 0x%" PRIx16 ", " + "{ 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 " }\n", g.Data1, g.Data2, g.Data3, g.Data4[0], g.Data4[1], g.Data4[2], g.Data4[3], g.Data4[4], g.Data4[5], g.Data4[6], g.Data4[7]); diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 43c5f98c0..c98830620 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.64 2004/08/27 19:33:20 valtri Exp $ + * $Id: input_cdda.c,v 1.65 2004/09/02 19:56:42 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -861,6 +861,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f #define _BUFSIZ 300 +#ifndef WIN32 static int parse_url (char *urlbuf, char** host, int *port) { char *start = NULL; char *portcolon = NULL; @@ -895,6 +896,7 @@ static int parse_url (char *urlbuf, char** host, int *port) { return 0; } +#endif static int network_command( xine_stream_t *stream, int socket, char *data_buf, char *msg, ...) { @@ -1814,10 +1816,9 @@ static void _cdda_free_cddb_info(cdda_input_plugin_t *this) { static int cdda_open(cdda_input_plugin_t *this_gen, char *cdda_device, cdrom_toc *toc, int *fdd) { - +#ifndef WIN32 int fd = -1; -#ifndef WIN32 if ( !cdda_device ) return -1; *fdd = -1; @@ -2025,7 +2026,7 @@ static int cdda_close(cdda_input_plugin_t *this_gen) { this_gen->h_device_handle = NULL; if( this_gen->hASPI ) FreeLibrary( (HMODULE)this_gen->hASPI ); - this_gen->hASPI = NULL; + this_gen->hASPI = (long)NULL; #endif /* WIN32 */ return 0; diff --git a/src/input/input_file.c b/src/input/input_file.c index 2aff36717..9e761f3cd 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.95 2004/07/25 17:11:59 mroi Exp $ + * $Id: input_file.c,v 1.96 2004/09/02 19:56:42 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -47,7 +47,7 @@ #define MAXFILES 65535 -#ifndef _MSC_VER +#ifndef WIN32 /* MS needs O_BINARY to open files, for everyone else, * make sure it doesn't get in the way */ # define O_BINARY 0 diff --git a/src/input/media_helper.c b/src/input/media_helper.c index d07acbab6..2c61cdb6a 100644 --- a/src/input/media_helper.c +++ b/src/input/media_helper.c @@ -51,9 +51,9 @@ #define LOG_MEDIA_EJECT +#ifndef WIN32 static int media_umount_media(const char *device) { -#ifndef WIN32 pid_t pid; int status; @@ -73,10 +73,8 @@ static int media_umount_media(const char *device) } while(1); return -1; -#else - return 0; -#endif } +#endif int media_eject_media (xine_t *xine, const char *device) { diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 93e449fff..ae2f2e543 100755 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -20,7 +20,7 @@ * video_out_directx.c, direct draw video output plugin for xine * by Matthew Grooms <elon@altavista.com> * - * $Id: video_out_directx.c,v 1.17 2004/05/02 19:40:47 mroi Exp $ + * $Id: video_out_directx.c,v 1.18 2004/09/02 19:56:42 valtri Exp $ */ typedef unsigned char boolean; @@ -181,8 +181,8 @@ boolean CreatePrimary( win32_driver_t * win32_driver ) result = DirectDrawCreate( 0, &ddobj, 0 ); if( result != DD_OK ) { - Error( 0, "DirectDrawCreate : error %i", result ); - xprintf(win32_driver->xine, XINE_VERBOSITY_DEBUG, "vo_out_directx : DirectDrawCreate : error %i\n", result ); + Error( 0, "DirectDrawCreate : error %ld", result ); + xprintf(win32_driver->xine, XINE_VERBOSITY_DEBUG, "vo_out_directx : DirectDrawCreate : error %ld\n", result ); return 0; } @@ -857,7 +857,6 @@ static void win32_frame_dispose( vo_frame_t * vo_frame ) static vo_frame_t * win32_alloc_frame( vo_driver_t * vo_driver ) { - win32_driver_t *win32_driver = (win32_driver_t *)vo_driver; win32_frame_t *win32_frame; win32_frame = ( win32_frame_t * ) xine_xmalloc( sizeof( win32_frame_t ) ); @@ -1084,10 +1083,10 @@ static void win32_display_frame( vo_driver_t * vo_driver, vo_frame_t * vo_frame DisplayFrame( win32_driver ); /* tag our frame as displayed */ - if((win32_driver->current != NULL) && (win32_driver->current != vo_frame)) { + if((win32_driver->current != NULL) && ((vo_frame_t *)win32_driver->current != vo_frame)) { vo_frame->free(&win32_driver->current->vo_frame); } - win32_driver->current = vo_frame; + win32_driver->current = (win32_frame_t *)vo_frame; } static void win32_overlay_blend( vo_driver_t * vo_driver, vo_frame_t * vo_frame, vo_overlay_t * vo_overlay ) @@ -1142,12 +1141,12 @@ static int win32_gui_data_exchange( vo_driver_t * vo_driver, int data_type, void static int win32_redraw_needed(vo_driver_t* this_gen) { - win32_driver_t *win32_driver = (win32_driver_t *) this_gen; - int ret = 0; /* TC - May need to revisit this! */ #ifdef TC + win32_driver_t *win32_driver = (win32_driver_t *) this_gen; + if( _x_vo_scale_redraw_needed( &win32_driver->sc ) ) { win32_gui_data_exchange(this_gen, GUI_WIN32_MOVED_OR_RESIZED, 0); ret = 1; @@ -1177,7 +1176,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *wi /* Make sure that the DirectX drivers are available and present! */ /* Not complete yet */ - win32_driver->win32_visual = win32_visual; + win32_driver->win32_visual = (win32_visual_t *)win32_visual; win32_driver->vo_driver.get_capabilities = win32_get_capabilities; win32_driver->vo_driver.alloc_frame = win32_alloc_frame ; win32_driver->vo_driver.update_frame_format = win32_update_frame_format; diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c index 78e68d815..382874124 100644 --- a/src/xine-engine/io_helper.c +++ b/src/xine-engine/io_helper.c @@ -73,7 +73,7 @@ static int _x_io_tcp_connect_ipv4(xine_stream_t *stream, const char *host, int p } #else { - int non_block = 1; + unsigned long non_block = 1; int rc; rc = ioctlsocket(s, FIONBIO, &non_block); @@ -249,7 +249,7 @@ int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_msec) { socklen_t len = sizeof(int); int err; - if ((getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len)) == -1) { + if ((getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&err, &len)) == -1) { _x_message(stream, XINE_MSG_CONNECTION_REFUSED, _("failed to get status of socket"), strerror(errno), NULL); return XIO_ERROR; } diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 6585a7bf2..8264d1cd8 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -921,9 +921,9 @@ static void osd_free_encoding(osd_object_t *osd) { * "" ... locale encoding */ static int osd_set_encoding (osd_object_t *osd, const char *encoding) { +#ifdef HAVE_ICONV char *enc; -#ifdef HAVE_ICONV osd_free_encoding(osd); lprintf("osd=%p, encoding=%s\n", osd, encoding ? (encoding[0] ? encoding : "locale") : "no conversion"); diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 52364b397..ad9375093 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.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: utils.c,v 1.31 2004/09/01 18:19:51 valtri Exp $ + * $Id: utils.c,v 1.32 2004/09/02 19:56:42 valtri Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ @@ -49,6 +49,9 @@ #include <libgen.h> #endif +#ifdef __CYGWIN__ +#include <windows.h> +#endif typedef struct { char *language; /* name of the locale */ diff --git a/win32/include/unistd.h b/win32/include/unistd.h index 23776f772..ae2cc4fcb 100644 --- a/win32/include/unistd.h +++ b/win32/include/unistd.h @@ -38,7 +38,7 @@ #define _SYS_UNISTD_H_ #ifndef inline -#define inline __inline +# define inline __inline #endif #define mkdir( A, B ) _mkdir( A ) @@ -48,15 +48,15 @@ # define S_ISDIR(m) ((m) & _S_IFDIR) #endif -#ifndef S_ISDIR +#ifndef S_ISREG # define S_ISREG(m) ((m) & _S_IFREG) #endif -#ifndef S_ISDIR +#ifndef S_ISBLK # define S_ISBLK(m) 0 #endif -#ifndef S_ISDIR +#ifndef S_ISCHR # define S_ISCHR(m) 0 #endif @@ -87,7 +87,6 @@ #define snprintf _snprintf #define vsnprintf _vsnprintf -// FIXME : I dont remember why this is here -#define readlink +#define readlink(PATH, BUF, BUFSIZ) 0 #endif |