diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_out/audio_directx2_out.c | 8 | ||||
-rw-r--r-- | src/audio_out/audio_directx_out.c | 6 | ||||
-rw-r--r-- | src/input/input_cdda.c | 4 | ||||
-rw-r--r-- | src/video_dec/Makefile.am | 4 | ||||
-rw-r--r-- | src/video_dec/libmpeg2new/Makefile.am | 10 | ||||
-rw-r--r-- | src/video_dec/libmpeg2new/xine_mpeg2new_decoder.c | 18 | ||||
-rw-r--r-- | src/video_out/video_out_directx.c | 24 |
7 files changed, 51 insertions, 23 deletions
diff --git a/src/audio_out/audio_directx2_out.c b/src/audio_out/audio_directx2_out.c index d853837ab..5a1929203 100644 --- a/src/audio_out/audio_directx2_out.c +++ b/src/audio_out/audio_directx2_out.c @@ -142,9 +142,13 @@ typedef struct { * Defining them here allows us to get rid of the dxguid library during * the linking stage. *****************************************************************************/ -static const GUID IID_IDirectSoundNotify = { +static const GUID xine_IID_IDirectSoundNotify = { 0xB0210783, 0x89CD, 0x11D0, {0xAF, 0x08, 0x00, 0xA0, 0xC9, 0x25, 0xCD, 0x16} }; +#ifdef IID_IDirectSoundNotify +# undef IID_IDirectSoundNotify +#endif +#define IID_IDirectSoundNotify xine_IID_IDirectSoundNotify @@ -549,8 +553,6 @@ static size_t buffer_occupied_size(dx2_driver_t *this) { /* service thread working with direct sound buffer */ static void *buffer_service(void *data) { dx2_driver_t *this = (dx2_driver_t *)data; - DWORD ret; - size_t play_pos; size_t buffer_min; size_t data_in_buffer; diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index 60d61780b..7b5029a45 100644 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -60,9 +60,13 @@ typedef unsigned char boolean; * the linking stage. *****************************************************************************/ #if 1 -static const GUID IID_IDirectSoundNotify = { +static const GUID xine_IID_IDirectSoundNotify = { 0xB0210783,0x89CD,0x11D0,{0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16} }; +#ifdef IID_IDirectSoundNotify +# undef IID_IDirectSoundNotify +#endif +#define IID_IDirectSoundNotify xine_IID_IDirectSoundNotify #endif diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 697f9dec3..b7aed3a5e 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -2058,9 +2058,9 @@ static int cdda_open(cdda_input_plugin_t *this_gen, hASPI = LoadLibrary( "wnaspi32.dll" ); if( hASPI != NULL ) { - (FARPROC) lpGetSupport = GetProcAddress( hASPI, + lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" ); - (FARPROC) lpSendCommand = GetProcAddress( hASPI, + lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" ); } diff --git a/src/video_dec/Makefile.am b/src/video_dec/Makefile.am index 91246eb4d..bbafba88d 100644 --- a/src/video_dec/Makefile.am +++ b/src/video_dec/Makefile.am @@ -1,4 +1,6 @@ -SUBDIRS = libmpeg2 +SUBDIRS = \ + libmpeg2 \ + libmpeg2new include $(top_srcdir)/misc/Makefile.common diff --git a/src/video_dec/libmpeg2new/Makefile.am b/src/video_dec/libmpeg2new/Makefile.am index 8c248fdcb..41c23878c 100644 --- a/src/video_dec/libmpeg2new/Makefile.am +++ b/src/video_dec/libmpeg2new/Makefile.am @@ -5,8 +5,10 @@ AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = libmpeg2 -xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la +xineplug_LTLIBRARIES = xineplug_decode_mpeg2new.la -xineplug_decode_mpeg2_la_SOURCES = xine_mpeg2_decoder.c -xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) +xineplug_decode_mpeg2new_la_SOURCES = \ + xine_mpeg2new_decoder.c + +xineplug_decode_mpeg2new_la_LIBADD = $(XINE_LIB) libmpeg2/libmpeg2.la +xineplug_decode_mpeg2new_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) diff --git a/src/video_dec/libmpeg2new/xine_mpeg2new_decoder.c b/src/video_dec/libmpeg2new/xine_mpeg2new_decoder.c index 7494791b1..3e42a161d 100644 --- a/src/video_dec/libmpeg2new/xine_mpeg2new_decoder.c +++ b/src/video_dec/libmpeg2new/xine_mpeg2new_decoder.c @@ -35,13 +35,14 @@ #include <xine/video_out.h> #include <xine/buffer.h> - - +/* #define LOG #define LOG_FRAME_ALLOC_FREE #define LOG_ENTRY #define LOG_FRAME_COUNTER +*/ +#define _x_abort() do {} while (0) typedef struct { video_decoder_class_t decoder_class; @@ -66,7 +67,9 @@ typedef struct mpeg2_video_decoder_s { } mpeg2_video_decoder_t; - +#ifndef LOG_FRAME_ALLOC_FREE +inline static void mpeg2_video_print_bad_state(img_state_t * img_state) {} +#else static void mpeg2_video_print_bad_state(img_state_t * img_state) { int32_t n,m; m=0; @@ -79,6 +82,7 @@ static void mpeg2_video_print_bad_state(img_state_t * img_state) { if (m > 3) _x_abort(); if (m == 0) printf("NO FRAMES\n"); } +#endif static void mpeg2_video_free_all(img_state_t * img_state) { int32_t n,m; @@ -153,7 +157,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, info->sequence->picture_width); _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, info->sequence->picture_height); _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, info->sequence->frame_period / 300); - if (this->force_aspect) info->sequence->pixel_width = this->force_aspect; + if (this->force_aspect) ((mpeg2_sequence_t *)info->sequence)->pixel_width = this->force_aspect; /* ugly... */ switch (info->sequence->pixel_width) { case 3: this->ratio = 16.0 / 9.0; @@ -490,14 +494,14 @@ static void *init_plugin (xine_t *xine, void *data) { * exported plugin catalog entry */ -static uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; +static const uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; -static decoder_info_t dec_info_mpeg2 = { +static const decoder_info_t dec_info_mpeg2 = { supported_types, /* supported types */ 6 /* priority */ }; -plugin_info_t xine_plugin_info[] = { +const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER, 19, "mpeg2new", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 32cf58af3..ad0150bbd 100644 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -55,21 +55,33 @@ typedef unsigned char boolean; * the linking stage. *****************************************************************************/ #if 1 -static const GUID IID_IDirectDraw = { +static const GUID xine_IID_IDirectDraw = { 0x6C14DB80,0xA733,0x11CE,{0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60} }; +#ifdef IID_IDirectDraw +# undef IID_IDirectDraw +#endif +#define IID_IDirectDraw xine_IID_IDirectDraw #endif #if 0 static const GUID IID_IDirectDraw2 = { 0xB3A6F3E0,0x2B43,0x11CF,{0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56} }; +#ifdef IID_IDirectDraw2 +# undef IID_IDirectDraw2 +#endif +#define IID_IDirectDraw2 xine_IID_IDirectDraw2 #endif #if 0 static const GUID IID_IDirectDraw4 = { 0x9C59509A,0x39BD,0x11D1,{0x8C,0x4A,0x00,0xC0,0x4F,0xD9,0x30,0xC5} }; +#ifdef IID_IDirectDraw4 +# undef IID_IDirectDraw4 +#endif +#define IID_IDirectDraw4 xine_IID_IDirectDraw4 #endif /* ----------------------------------------- @@ -488,6 +500,7 @@ static boolean CheckPixelFormat( win32_driver_t * win32_driver ) return TRUE; } +#if 0 /* Create a Direct draw surface from * a bitmap resource.. * @@ -553,6 +566,7 @@ static LPDIRECTDRAWSURFACE CreateBMP( win32_driver_t * win32_driver, int resourc return bmp_surf; } +#endif /* Merge overlay with the current primary * surface. This funtion is only used when @@ -1162,11 +1176,10 @@ static int win32_gui_data_exchange( vo_driver_t * vo_driver, int data_type, void UpdateRect( win32_driver->win32_visual ); DisplayFrame( win32_driver ); break; - case XINE_GUI_SEND_DRAWABLE_CHANGED: - { + { HRESULT result; - HWND newWndHnd = (HWND) data; + HWND newWndHnd = (HWND) data; /* set cooperative level */ result = IDirectDraw_SetCooperativeLevel( win32_driver->ddobj, newWndHnd, DDSCL_NORMAL ); @@ -1185,10 +1198,11 @@ static int win32_gui_data_exchange( vo_driver_t * vo_driver, int data_type, void /* store our objects in our visual struct */ win32_driver->win32_visual->WndHnd = newWndHnd; /* update video area and redraw current frame */ - UdateRect( win32_driver->win32_visual ); + UpdateRect( win32_driver->win32_visual ); DisplayFrame( win32_driver ); break; } + } return 0; } |