Mercurial > mplayer.hg
changeset 7471:5e56ce70b551
wine headers cleanup
- WAVEFORMATEX & BITMAPINFOHEADER decl moved to stheader.h
- lots of useless include wine/* removed from mplayer code
- fixed few warnings
author | arpi |
---|---|
date | Sun, 22 Sep 2002 00:43:14 +0000 |
parents | a117511790c0 |
children | c4434bdf6e51 |
files | libmpcodecs/ad_acm.c libmpcodecs/vd.h libmpcodecs/vd_vfw.c libmpdemux/aviprint.c libmpdemux/stheader.h mencoder.c |
diffstat | 6 files changed, 50 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_acm.c Sun Sep 22 00:39:13 2002 +0000 +++ b/libmpcodecs/ad_acm.c Sun Sep 22 00:43:14 2002 +0000 @@ -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 @@ 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();
--- a/libmpcodecs/vd.h Sun Sep 22 00:39:13 2002 +0000 +++ b/libmpcodecs/vd.h Sun Sep 22 00:43:14 2002 +0000 @@ -1,4 +1,5 @@ +#include "mp_image.h" #include "mpc_info.h" typedef mp_codec_info_t vd_info_t;
--- a/libmpcodecs/vd_vfw.c Sun Sep 22 00:39:13 2002 +0000 +++ b/libmpcodecs/vd_vfw.c Sun Sep 22 00:43:14 2002 +0000 @@ -7,12 +7,10 @@ #ifdef USE_WIN32DLL -#include "loader.h" -//#include "wine/mmreg.h" +#include "vd_internal.h" + +#include "wine/driver.h" #include "wine/vfw.h" -#include "wine/avifmt.h" - -#include "vd_internal.h" static vd_info_t info = { #ifdef BUILD_VFWEX @@ -143,7 +141,6 @@ // 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 @@ // 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;
--- a/libmpdemux/aviprint.c Sun Sep 22 00:39:13 2002 +0000 +++ b/libmpdemux/aviprint.c Sun Sep 22 00:43:14 2002 +0000 @@ -5,6 +5,7 @@ #include "config.h" +// for avi_stream_id(): #include "stream.h" #include "demuxer.h"
--- a/libmpdemux/stheader.h Sun Sep 22 00:39:13 2002 +0000 +++ b/libmpdemux/stheader.h Sun Sep 22 00:43:14 2002 +0000 @@ -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" + +#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_ */ -#include "../libmpcodecs/mp_image.h" +#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;
--- a/mencoder.c Sun Sep 22 00:39:13 2002 +0000 +++ b/mencoder.c Sun Sep 22 00:43:14 2002 +0000 @@ -43,12 +43,16 @@ #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 <lame/lame.h>