diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c index 6f46675025..29cfe412c3 100644 --- a/libmpcodecs/ad_acm.c +++ b/libmpcodecs/ad_acm.c @@ -8,10 +8,7 @@ #ifdef USE_WIN32DLL -#include "loader.h" -//#include "wine/mmreg.h" -#include "wine/vfw.h" -#include "wine/avifmt.h" +#include "wineacm.h" #include "ad_internal.h" @@ -144,10 +141,10 @@ static void uninit(sh_audio_t *sh) return(uninit(sh)); case ACMERR_UNPREPARED: case ACMERR_NOTPOSSIBLE: - return(0); + return; default: mp_msg(MSGT_WIN32, MSGL_WARN, "ACM_Decoder: unknown error occured: %d\n", ret); - return(0); + return; } MSACM_UnregisterAllDrivers(); diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h index 0d4348c6d8..37f323b96f 100644 --- a/libmpcodecs/vd.h +++ b/libmpcodecs/vd.h @@ -1,4 +1,5 @@ +#include "mp_image.h" #include "mpc_info.h" typedef mp_codec_info_t vd_info_t; diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c index 5b3a31caf9..bc85ee623d 100644 --- a/libmpcodecs/vd_vfw.c +++ b/libmpcodecs/vd_vfw.c @@ -7,13 +7,11 @@ #ifdef USE_WIN32DLL -#include "loader.h" -//#include "wine/mmreg.h" -#include "wine/vfw.h" -#include "wine/avifmt.h" - #include "vd_internal.h" +#include "wine/driver.h" +#include "wine/vfw.h" + static vd_info_t info = { #ifdef BUILD_VFWEX "Win32/VfWex video codecs", @@ -143,7 +141,6 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ // init driver static int init(sh_video_t *sh){ HRESULT ret; - int yuv=0; // unsigned int outfmt=sh->codec->outfmt[sh->outfmtidx]; int i, o_bih_len; vd_vfw_ctx *priv; @@ -160,7 +157,7 @@ static int init(sh_video_t *sh){ // win32_codec_name = sh->codec->dll; // sh->hic = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_FASTDECOMPRESS); // priv->handle = ICOpen( 0x63646976, sh->bih->biCompression, ICMODE_DECOMPRESS); - priv->handle = ICOpen( sh->codec->dll, sh->bih->biCompression, ICMODE_DECOMPRESS); + priv->handle = ICOpen( (long)(sh->codec->dll), sh->bih->biCompression, ICMODE_DECOMPRESS); if(!priv->handle){ mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n"); return 0; diff --git a/libmpdemux/aviprint.c b/libmpdemux/aviprint.c index f5567286ef..87d02ea350 100644 --- a/libmpdemux/aviprint.c +++ b/libmpdemux/aviprint.c @@ -5,6 +5,7 @@ #include "config.h" +// for avi_stream_id(): #include "stream.h" #include "demuxer.h" diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h index 4222630238..559af7d67f 100644 --- a/libmpdemux/stheader.h +++ b/libmpdemux/stheader.h @@ -1,13 +1,45 @@ #ifndef __ST_HEADER_H #define __ST_HEADER_H 1 -// Stream headers: - -#include "wine/mmreg.h" +// for AVIStreamHeader: #include "wine/avifmt.h" -#include "wine/vfw.h" -#include "../libmpcodecs/mp_image.h" +#ifndef _WAVEFORMATEX_ +#define _WAVEFORMATEX_ +typedef struct __attribute__((__packed__)) _WAVEFORMATEX { + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + WORD wBitsPerSample; + WORD cbSize; +} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX; +#endif /* _WAVEFORMATEX_ */ + +#ifndef _BITMAPINFOHEADER_ +#define _BITMAPINFOHEADER_ +typedef struct __attribute__((__packed__)) +{ + int biSize; + int biWidth; + int biHeight; + short biPlanes; + short biBitCount; + int biCompression; + int biSizeImage; + int biXPelsPerMeter; + int biYPelsPerMeter; + int biClrUsed; + int biClrImportant; +} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER; +typedef struct { + BITMAPINFOHEADER bmiHeader; + int bmiColors[1]; +} BITMAPINFO, *LPBITMAPINFO; +#endif + +// Stream headers: typedef struct { demux_stream_t *ds; diff --git a/mencoder.c b/mencoder.c index 2d624bc578..0363bc4e8a 100644 --- a/mencoder.c +++ b/mencoder.c @@ -43,12 +43,16 @@ static char* banner_text= #include "libvo/video_out.h" +#include "libmpcodecs/mp_image.h" #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_video.h" #include "libmpcodecs/vf.h" #include "libmpdemux/mp3_hdr.h" +// for MPEGLAYER3WAVEFORMAT: +#include "loader/wine/mmreg.h" + #ifdef HAVE_MP3LAME #undef CDECL #include