From 4357e135eb0d26b876fad0557683d80bc7714e0e Mon Sep 17 00:00:00 2001 From: voroshil Date: Thu, 13 Sep 2007 16:13:37 +0000 Subject: Move AM_MEDIA_TYPE structure definition to mediatype.h. Make inclusion of com.h and wine/*.h conditional, this will allow reusing of mediatype.c code under MinGW without requirement to include all remaining wine/* stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24448 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/dshow/guids.h | 24 ++++++++++++------------ loader/dshow/mediatype.c | 2 +- loader/dshow/mediatype.h | 13 +++++++++++++ 3 files changed, 26 insertions(+), 13 deletions(-) (limited to 'loader') diff --git a/loader/dshow/guids.h b/loader/dshow/guids.h index 99a101a4db..a29c309aef 100644 --- a/loader/dshow/guids.h +++ b/loader/dshow/guids.h @@ -1,26 +1,26 @@ #ifndef DS_GUIDS_H #define DS_GUIDS_H +/* +this will be defined if already included before this file +under MinGW +*/ + +#ifndef GUID_DEFINED #include "com.h" +#endif + +#ifndef VFWAPI #include "wine/module.h" #include "wine/windef.h" #include "wine/vfw.h" +#endif + +#include "mediatype.h" //#define Debug if(1) #define Debug if(0) -typedef struct __attribute__((__packed__)) _MediaType -{ - GUID majortype; //0x0 - GUID subtype; //0x10 - int bFixedSizeSamples; //0x20 - int bTemporalCompression; //0x24 - unsigned long lSampleSize; //0x28 - GUID formattype; //0x2c - IUnknown* pUnk; //0x3c - unsigned long cbFormat; //0x40 - char* pbFormat; //0x44 -} AM_MEDIA_TYPE; typedef long long REFERENCE_TIME; diff --git a/loader/dshow/mediatype.c b/loader/dshow/mediatype.c index 3ce6a9a066..28b98dc2d6 100644 --- a/loader/dshow/mediatype.c +++ b/loader/dshow/mediatype.c @@ -20,10 +20,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ -#include "mediatype.h" #include "mp_msg.h" #include "wine/winerror.h" #include "com.h" +#include "mediatype.h" #include "libwin32.h" void DisplayMediaType(const char * label,const AM_MEDIA_TYPE* pmt){ diff --git a/loader/dshow/mediatype.h b/loader/dshow/mediatype.h index d59cb36837..9ed36eec43 100644 --- a/loader/dshow/mediatype.h +++ b/loader/dshow/mediatype.h @@ -7,6 +7,19 @@ #define DS_MEDIATYPE_H #include "guids.h" +typedef struct __attribute__((__packed__)) _MediaType +{ + GUID majortype; //0x0 + GUID subtype; //0x10 + int bFixedSizeSamples; //0x20 + int bTemporalCompression; //0x24 + unsigned long lSampleSize; //0x28 + GUID formattype; //0x2c + IUnknown* pUnk; //0x3c + unsigned long cbFormat; //0x40 + char* pbFormat; //0x44 +} AM_MEDIA_TYPE; + /** * \brief print info from AM_MEDIA_TYPE structure * =param[in] label short lable for media type -- cgit v1.2.3