From e9d3fc29c17ce3cb3f609e65de4b4852681ae4ef Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sun, 16 Sep 2001 23:13:45 +0000 Subject: Update docs. Fixed some warnings. configure.in is ready for 0.9.1. CVS patchset: 646 CVS date: 2001/09/16 23:13:45 --- src/demuxers/demux_qt.c | 17 +++++++++++------ src/libffmpeg/libavcodec/idct_mmx.c | 3 +++ src/liblpcm/xine_decoder.c | 4 ++-- src/libvfill/xine_decoder.c | 2 -- src/libw32dll/w32codec.c | 12 +++++++++--- src/libw32dll/wine/debugtools.h | 30 +++++++++++++++++++++--------- src/libw32dll/wine/driver.c | 3 +-- src/libw32dll/wine/ext.c | 8 ++++---- src/libw32dll/wine/module.c | 10 +++++----- src/libw32dll/wine/pe_image.c | 23 ++++++++++------------- src/libw32dll/wine/registry.c | 5 ++++- src/libw32dll/wine/resource.c | 4 ++-- src/libw32dll/wine/win32.c | 24 ++++++++++++++---------- src/video_out/yuv2rgb.c | 4 +--- 14 files changed, 87 insertions(+), 62 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index c7f2e0e79..18eeaaaaa 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.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_qt.c,v 1.3 2001/09/11 23:02:47 guenter Exp $ + * $Id: demux_qt.c,v 1.4 2001/09/16 23:13:45 f1rmb Exp $ * * demultiplexer for quicktime streams, based on: * @@ -1221,6 +1221,7 @@ static int quicktime_read_udta(quicktime_t *file, quicktime_udta_t *udta, quickt return result; } +#if 0 static int quicktime_set_udta_string(char **string, int *size, char *new_string) { if(*size) free(*string); @@ -1229,6 +1230,7 @@ static int quicktime_set_udta_string(char **string, int *size, char *new_string) strcpy(*string, new_string); return 0; } +#endif static int quicktime_ctab_init(quicktime_ctab_t *ctab) { @@ -2714,6 +2716,7 @@ static int quicktime_read_trak(quicktime_t *file, quicktime_trak_t *trak, quickt return 0; } +#if 0 static longest quicktime_track_end(quicktime_trak_t *trak) { /* get the byte endpoint of the track in the file */ @@ -2753,6 +2756,7 @@ static longest quicktime_track_end(quicktime_trak_t *trak) return size; } +#endif static long quicktime_sample_of_chunk(quicktime_trak_t *trak, long chunk) { @@ -3015,6 +3019,7 @@ static long quicktime_offset_to_sample(quicktime_trak_t *trak, longest offset) return sample; } +#if 0 static int quicktime_update_tables(quicktime_t *file, quicktime_trak_t *trak, longest offset, @@ -3029,6 +3034,7 @@ static int quicktime_update_tables(quicktime_t *file, quicktime_update_stsc(&(trak->mdia.minf.stbl.stsc), chunk, samples); return 0; } +#endif static int quicktime_trak_duration(quicktime_trak_t *trak, long *duration, @@ -3583,7 +3589,7 @@ static long quicktime_frame_size(quicktime_t *file, long frame, int track) return bytes; } - +#if 0 static longest quicktime_read_next_packet(quicktime_t *file, unsigned char *outbuf, int *isVideo, int *thetrak) { longest packet_start; @@ -3642,8 +3648,7 @@ static longest quicktime_read_next_packet(quicktime_t *file, unsigned char *outb return 0; } - - +#endif static long quicktime_read_frame(quicktime_t *file, unsigned char *video_buffer, int track) { @@ -3984,7 +3989,7 @@ static void *demux_qt_loop (void *this_gen) { buf->free_buffer (buf); } else { - int count; + /* int count; */ buf->PTS = audio_pts; buf->type = this->audio_type; @@ -4220,7 +4225,7 @@ static void demux_qt_start (demux_plugin_t *this_gen, return; } - printf ("demux_qt: video codec %s (%f fps), audio codec %s (%d Hz, %d bits)\n", + printf ("demux_qt: video codec %s (%f fps), audio codec %s (%ld Hz, %d bits)\n", quicktime_video_compressor (this->qt,0), quicktime_frame_rate (this->qt,0), quicktime_audio_compressor (this->qt,0), diff --git a/src/libffmpeg/libavcodec/idct_mmx.c b/src/libffmpeg/libavcodec/idct_mmx.c index 34c25b411..3c1a401e3 100644 --- a/src/libffmpeg/libavcodec/idct_mmx.c +++ b/src/libffmpeg/libavcodec/idct_mmx.c @@ -28,6 +28,9 @@ #include "cpu_accel.h" +#ifdef ATTR_ALIGN +#undef ATTR_ALIGN +#endif #define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align))) #define ROW_SHIFT 11 diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c index 4b4ba8b5d..ef57b2738 100644 --- a/src/liblpcm/xine_decoder.c +++ b/src/liblpcm/xine_decoder.c @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.9 2001/09/11 14:10:04 jcdutton Exp $ + * $Id: xine_decoder.c,v 1.10 2001/09/16 23:13:45 f1rmb Exp $ * * 31-8-2001 Added LPCM rate sensing. * (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk * * stuff needed to turn libac3 into a xine decoder plugin */ - +#define _XOPEN_SOURCE 500 #include #include diff --git a/src/libvfill/xine_decoder.c b/src/libvfill/xine_decoder.c index 3b09bf2f2..13693a6dd 100644 --- a/src/libvfill/xine_decoder.c +++ b/src/libvfill/xine_decoder.c @@ -58,8 +58,6 @@ static void videofill_decode_data (video_decoder_t *this_gen, buf_element_t *buf videofill_decoder_t *this = (videofill_decoder_t *) this_gen; vo_frame_t *img, *last_img; - metronom_t *metronom; - last_img = this->video_out->get_last_frame (this->video_out); diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index c59120382..bcea81196 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.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: w32codec.c,v 1.23 2001/09/14 14:20:51 jcdutton Exp $ + * $Id: w32codec.c,v 1.24 2001/09/16 23:13:45 f1rmb Exp $ * * routines for using w32 codecs * @@ -132,7 +132,13 @@ static char* get_vids_codec_name(w32v_decoder_t *this, return NULL; } +#ifdef IMGFMT_YUY2 +#undef IMGFMT_YUY2 +#endif #define IMGFMT_YUY2 mmioFOURCC('Y','U','Y','2') +#ifdef IMGFMT_YV12 +#undef IMGFMT_YV12 +#endif #define IMGFMT_YV12 mmioFOURCC('Y','V','1','2') #define IMGFMT_32RGB mmioFOURCC( 32,'R','G','B') #define IMGFMT_24RGB mmioFOURCC( 24,'R','G','B') @@ -188,7 +194,7 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) { return; } - printf ("w32codec: video output format: %.4s %08x\n", + printf ("w32codec: video output format: %.4s %08lx\n", (char*)&this->o_bih.biCompression, this->o_bih.biCompression); @@ -295,7 +301,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { uint8_t y,u,v; pixel = this->img_buffer + 2 * (row * this->o_bih.biWidth + col); - out = img->base[0] + 2 * (row * this->o_bih.biWidth + col); + out = (uint16_t *) img->base[0] + 2 * (row * this->o_bih.biWidth + col); b = (*pixel & 0x003C) << 3; g = (*pixel & 0x03E0) >> 5 << 3; diff --git a/src/libw32dll/wine/debugtools.h b/src/libw32dll/wine/debugtools.h index 9290f5705..98e963246 100644 --- a/src/libw32dll/wine/debugtools.h +++ b/src/libw32dll/wine/debugtools.h @@ -70,13 +70,27 @@ extern int dbg_printf(const char *format, ...) __attribute__((format (printf,1,2 extern int dbg_printf(const char *format, ...); #endif -#define TRACE_(X) -#define WARN_(X) -#define WARN -#define ERR_(X) -#define ERR -#define FIXME_(X) -#define FIXME +#ifdef __GNUC__ +#define TRACE_(X, Y...) +#define WARN_(X, Y...) +#define WARN(X,Y...) +#define ERR(X,Y...) +#define FIXME(X,Y...) +#define DPRINTF(X,Y...) +#define MESSAGE(X,Y...) +#define ERR_(X,Y...) +#define FIXME_(X,Y...) +#else +#define WARN_(...) +#define WARN(...) +#define TRACE_(...) +#define ERR(...) +#define FIXME(...) +#define DPRINTF(...) +#define MESSAGE(...) +#define ERR_(...) +#define FIXME_(...) +#endif #define TRACE_ON(X) 1 #define ERR_ON(X) 1 @@ -86,7 +100,5 @@ extern int dbg_printf(const char *format, ...); #define DEFAULT_DEBUG_CHANNEL(ch) \ extern char dbch_##ch[]; static char * const __dbch_default = dbch_##ch; -#define DPRINTF -#define MESSAGE #endif /* __WINE_DEBUGTOOLS_H */ diff --git a/src/libw32dll/wine/driver.c b/src/libw32dll/wine/driver.c index 1a1c99bf7..08f5f745c 100644 --- a/src/libw32dll/wine/driver.c +++ b/src/libw32dll/wine/driver.c @@ -87,7 +87,6 @@ static NPDRVR DrvAlloc(HDRVR*lpDriver, LPUINT lpDrvResult) static void DrvFree(HDRVR hDriver) { - int i; if(hDriver) if(((DRVR*)hDriver)->hDriverModule) if(((DRVR*)hDriver)->DriverProc) @@ -113,7 +112,7 @@ char* win32_def_path =NULL; // must be set before calling DrvOpen() !!! HDRVR DrvOpen(LPARAM lParam2) { - ICOPEN *icopen=(ICOPEN*)lParam2; + // ICOPEN *icopen=(ICOPEN*)lParam2; UINT uDrvResult; HDRVR hDriver; NPDRVR npDriver; diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c index 865ff73d9..85adbc203 100644 --- a/src/libw32dll/wine/ext.c +++ b/src/libw32dll/wine/ext.c @@ -133,9 +133,9 @@ LPSTR WINAPI lstrcpynWtoA(LPSTR dest, LPCWSTR src, INT count) int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n) { if(s1==0) - return; + return 0; if(s2==0) - return; + return 0; while(n>0) { if(*s1<*s2) @@ -303,7 +303,7 @@ int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low ) printf("offsets larger than 4Gb not supported\n"); return munmap( start, size_low ); } -static int mapping_size=0; +//static int mapping_size=0; struct file_mapping_s; typedef struct file_mapping_s @@ -475,7 +475,7 @@ void* WINAPI VirtualAlloc(void* address, DWORD size, DWORD type, DWORD protecti if(answer==(void*)-1) { printf("Error no %d\n", errno); - printf("VirtualAlloc(0x%08X, %d) failed\n", address, size); + printf("VirtualAlloc(0x%08X, %ld) failed\n", (int) address, size); return NULL; } else diff --git a/src/libw32dll/wine/module.c b/src/libw32dll/wine/module.c index 9b921b09b..0ceb50547 100644 --- a/src/libw32dll/wine/module.c +++ b/src/libw32dll/wine/module.c @@ -253,7 +253,7 @@ WINE_MODREF *MODULE32_LookupHMODULE(HMODULE m) if(list==NULL) return NULL; } - TRACE("LookupHMODULE hit %X\n", list->wm); + TRACE("LookupHMODULE hit %X\n", (int)list->wm); return list->wm; } @@ -290,7 +290,7 @@ static WIN_BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved ) break; default: - ERR("wine_modref type %d not handled.\n", wm->type ); + ERR("wine_modref type %d not handled.\n", wm->type); retv = FALSE; break; } @@ -425,7 +425,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags) { if ( !MODULE_DllProcessAttach( wm, NULL ) ) { - WARN_(module)("Attach failed for module '%s', \n", libname); + WARN_(module, "Attach failed for module '%s', \n", libname); MODULE_FreeLibrary(wm); SetLastError(ERROR_DLL_INIT_FAILED); MODULE_RemoveFromList(wm); @@ -590,9 +590,9 @@ FARPROC MODULE_GetProcAddress( FARPROC retproc; if (HIWORD(function)) - TRACE_(win32)("(%08lx,%s)\n",(DWORD)hModule,function); + TRACE_(win32,"(%08lx,%s)\n",(DWORD)hModule,function); else - TRACE_(win32)("(%08lx,%p)\n",(DWORD)hModule,function); + TRACE_(win32,"(%08lx,%p)\n",(DWORD)hModule,function); if (!wm) { SetLastError(ERROR_INVALID_HANDLE); return (FARPROC)0; diff --git a/src/libw32dll/wine/pe_image.c b/src/libw32dll/wine/pe_image.c index 274813f13..095abf244 100644 --- a/src/libw32dll/wine/pe_image.c +++ b/src/libw32dll/wine/pe_image.c @@ -280,7 +280,7 @@ static DWORD fixup_imports( WINE_MODREF *wm ) */ for (i = 0, pe_imp = pem->pe_import; pe_imp->Name ; pe_imp++) { - WINE_MODREF *wmImp; + // WINE_MODREF *wmImp; IMAGE_IMPORT_BY_NAME *pe_name; PIMAGE_THUNK_DATA import_list,thunk_list; char *name = (char *) RVA(pe_imp->Name); @@ -381,7 +381,7 @@ static void do_relocations( unsigned int load_addr, IMAGE_BASE_RELOCATION *r ) char *page = (char*) RVA(r->VirtualAddress); int count = (r->SizeOfBlock - 8)/2; int i; - TRACE_(fixup)("%x relocations for page %lx\n", + TRACE_(fixup,"%x relocations for page %lx\n", count, r->VirtualAddress); for(i=0;iOptionalHeader.ImageBase, vma_size ); - TRACE_(segment)("Loading %s at %lx, range %x\n", + TRACE_(segment,"Loading %s at %lx, range %x\n", filename, load_addr, vma_size ); #if 0 @@ -622,7 +622,7 @@ HMODULE PE_LoadImage( int handle, LPCSTR filename, WORD *version ) 0, 0, PROT_EXEC | PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_FIXED ) != (void*)load_addr) { - ERR_(win32)( "Critical Error: failed to map PE header to necessary address.\n"); + ERR_(win32, "Critical Error: failed to map PE header to necessary address.\n"); goto error; } @@ -640,7 +640,7 @@ HMODULE PE_LoadImage( int handle, LPCSTR filename, WORD *version ) MAP_PRIVATE | MAP_FIXED ) != (void*)RVA(pe_sec->VirtualAddress)) { - ERR_(win32)( "Critical Error: failed to map PE section to necessary address.\n"); + ERR_(win32, "Critical Error: failed to map PE section to necessary address.\n"); goto error; } if ((pe_sec->SizeOfRawData < pe_sec->Misc.VirtualSize) && @@ -698,10 +698,7 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule, IMAGE_EXPORT_DIRECTORY *pe_export = NULL; IMAGE_RESOURCE_DIRECTORY *pe_resource = NULL; WINE_MODREF *wm; - int result; - - - + // int result; dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXPORT; if (dir->Size) @@ -898,7 +895,7 @@ WIN_BOOL PE_InitDLL( WINE_MODREF *wm, DWORD type, LPVOID lpReserved ) if(entry==NULL) entry = (void*)RVA_PTR( wm->module,OptionalHeader.AddressOfEntryPoint ); - TRACE_(relay)("CallTo32(entryproc=%p,module=%08x,type=%ld,res=%p)\n", + TRACE_(relay,"CallTo32(entryproc=%p,module=%08x,type=%ld,res=%p)\n", entry, wm->module, type, lpReserved ); printf("Entering DllMain("); switch(type) diff --git a/src/libw32dll/wine/registry.c b/src/libw32dll/wine/registry.c index aadf13f5b..53951831a 100644 --- a/src/libw32dll/wine/registry.c +++ b/src/libw32dll/wine/registry.c @@ -147,6 +147,7 @@ static void save_registry(void) } close(fd); } +#if 0 static reg_handle_t* find_handle_by_name(const char* name) { reg_handle_t* t; @@ -159,6 +160,7 @@ static reg_handle_t* find_handle_by_name(const char* name) } return 0; } +#endif static struct reg_value* find_value_by_name(const char* name) { int i; @@ -268,6 +270,7 @@ static void init_registry() insert_handle(HKEY_LOCAL_MACHINE, "HKLM"); insert_handle(HKEY_CURRENT_USER, "HKCU"); } +#if 0 static reg_handle_t* find_handle_2(long key, const char* subkey) { char* full_name; @@ -287,7 +290,7 @@ static reg_handle_t* find_handle_2(long key, const char* subkey) free(full_name); return t; } - +#endif long RegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey) { char* full_name; diff --git a/src/libw32dll/wine/resource.c b/src/libw32dll/wine/resource.c index 5a5079eef..f99233805 100644 --- a/src/libw32dll/wine/resource.c +++ b/src/libw32dll/wine/resource.c @@ -106,7 +106,7 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc) // NE_MODULE *pModule = NE_GetPtr( hMod16 ); // WINE_MODREF *wm = pModule && pModule->module32? // MODULE32_LookupHMODULE( pModule->module32 ) : NULL; - WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); + // WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); if ( !hModule || !hRsrc ) return 0; @@ -129,7 +129,7 @@ static HFILE RES_AccessResource( HMODULE hModule, HRSRC hRsrc ) { HFILE hFile = HFILE_ERROR; - WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); + // WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); if ( !hModule || !hRsrc ) return HFILE_ERROR; diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index b4ec59ef3..a1bf4768f 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -13,6 +13,7 @@ #include "win32.h" #include #include +#include #include #ifdef HAVE_MALLOC_H #include @@ -387,7 +388,7 @@ void* WINAPI expCreateEventA(void* pSecAttr, char bManualReset, { if(strcmp(pp->name, name)==0) return pp->pm; - }while(pp=pp->prev); + } while((pp=pp->prev)); } pm=my_mreq(sizeof(pthread_mutex_t), 0); pthread_mutex_init(pm, NULL); @@ -419,11 +420,13 @@ void* WINAPI expSetEvent(void* event) { dbgprintf("Trying to lock %X\n", event); pthread_mutex_lock(event); + return event; } void* WINAPI expResetEvent(void* event) { dbgprintf("Unlocking %X\n", event); pthread_mutex_unlock(event); + return event; } void* WINAPI expWaitForSingleObject(void* object, int duration) @@ -432,6 +435,7 @@ void* WINAPI expWaitForSingleObject(void* object, int duration) dbgprintf("WaitForSingleObject: duration %d\n", duration); pthread_mutex_lock(object); pthread_mutex_unlock(object); + return object; } static BYTE PF[64] = {0,}; @@ -441,7 +445,7 @@ void WINAPI expGetSystemInfo(SYSTEM_INFO* si) /* FIXME: better values for the two entries below... */ static int cache = 0; static SYSTEM_INFO cachedsi; - HKEY xhkey=0,hkey; + HKEY xhkey=0; dbgprintf("GetSystemInfo()\n"); if (cache) { @@ -889,7 +893,7 @@ long WINAPI expReleaseSemaphore(long hsem, long increment, long* prev_count) // is greater than zero and nonsignaled when its count is equal to zero // Each time a waiting thread is released because of the semaphore's signaled // state, the count of the semaphore is decreased by one. - struct sembuf buf[1]; + // struct sembuf buf[1]; dbgprintf("ReleaseSemaphore\n"); dbgprintf("WARNING: Unsupported call: ReleaseSemaphoreA\n"); /* if(hsem==-1)return 0; @@ -1148,7 +1152,7 @@ LPCSTR WINAPI expGetEnvironmentStrings() int WINAPI expGetStartupInfoA(STARTUPINFOA *s) { - int i; + /* int i; */ dbgprintf("GetStartupInfoA\n"); /* for(i=0; iwMinute = local_tm->tm_min; systime->wSecond = local_tm->tm_sec; systime->wMilliseconds = (tv.tv_usec / 1000) % 1000; - + return 0; } int WINAPI expGetEnvironmentVariableA(const char* name, char* field, int size) { dbgprintf("GetEnvironmentVariableA\n"); - printf("%s %x %x\n", name, field, size); + printf("%s %x %x\n", name, *field, size); if(field)field[0]=0; return 0; } @@ -1546,7 +1550,7 @@ int WINAPI expGetEnvironmentVariableA(const char* name, char* field, int size) //HDRVR WINAPI expOpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2); HDRVR WINAPI expOpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2){ printf("winmm32::OpenDriver() called\n"); - return NULL; + return (HDRVR) NULL; } @@ -1724,7 +1728,7 @@ void* LookupExternal(const char* library, int ordinal) { if(ordinal!=libraries[i].exps[j].id) continue; - printf("Hit: 0x%08X\n", libraries[i].exps[j].func); + printf("Hit: 0x%08X\n", (int) libraries[i].exps[j].func); return libraries[i].exps[j].func; } } diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index b35aaebc4..672f45858 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -22,7 +22,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: yuv2rgb.c,v 1.15 2001/09/11 17:12:39 jkeil Exp $ + * $Id: yuv2rgb.c,v 1.16 2001/09/16 23:13:45 f1rmb Exp $ */ #include "config.h" @@ -767,9 +767,7 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, static void yuv2rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _py, uint8_t * _pu, uint8_t * _pv) { - int U, V, Y; uint8_t * py_1, * py_2, * pu, * pv; - uint8_t * r, * g, * b; uint8_t * dst_1, * dst_2; int width, height, dst_height; int dy; -- cgit v1.2.3