[MPlayer-cvslog] r24448 - in trunk/loader/dshow: guids.h mediatype.c mediatype.h

voroshil subversion at mplayerhq.hu
Thu Sep 13 18:13:38 CEST 2007


Author: voroshil
Date: Thu Sep 13 18:13:37 2007
New Revision: 24448

Log:
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 requrenment to include all remaining wine/* stuff.


Modified:
   trunk/loader/dshow/guids.h
   trunk/loader/dshow/mediatype.c
   trunk/loader/dshow/mediatype.h

Modified: trunk/loader/dshow/guids.h
==============================================================================
--- trunk/loader/dshow/guids.h	(original)
+++ trunk/loader/dshow/guids.h	Thu Sep 13 18:13:37 2007
@@ -1,26 +1,26 @@
 #ifndef DS_GUIDS_H
 #define DS_GUIDS_H
 
+/*
+this will be defined if <ole2.h> 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;
 

Modified: trunk/loader/dshow/mediatype.c
==============================================================================
--- trunk/loader/dshow/mediatype.c	(original)
+++ trunk/loader/dshow/mediatype.c	Thu Sep 13 18:13:37 2007
@@ -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){

Modified: trunk/loader/dshow/mediatype.h
==============================================================================
--- trunk/loader/dshow/mediatype.h	(original)
+++ trunk/loader/dshow/mediatype.h	Thu Sep 13 18:13:37 2007
@@ -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



More information about the MPlayer-cvslog mailing list