[Mplayer-cvslog] CVS: main/loader/dshow DS_Filter.c,1.14,1.15 allocator.c,1.6,1.7 allocator.h,1.5,1.6 cmediasample.c,1.7,1.8 guids.c,1.5,1.6 guids.h,1.6,1.7 inputpin.c,1.6,1.7 inputpin.h,1.5,1.6 interfaces.h,1.7,1.8 iunk.h,1.3,1.4 outputpin.c,1.9,1.10 outputpin.h,1.5,1.6

Arpi of Ize arpi at mplayerhq.hu
Fri Sep 13 21:43:19 CEST 2002


Update of /cvsroot/mplayer/main/loader/dshow
In directory mail:/var/tmp.root/cvs-serv768/dshow

Modified Files:
	DS_Filter.c allocator.c allocator.h cmediasample.c guids.c 
	guids.h inputpin.c inputpin.h interfaces.h iunk.h outputpin.c 
	outputpin.h 
Log Message:
avifile sync - 95% cosmetics 5% bug


Index: DS_Filter.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/DS_Filter.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- DS_Filter.c	23 Jul 2002 12:03:05 -0000	1.14
+++ DS_Filter.c	13 Sep 2002 19:43:15 -0000	1.15
@@ -1,9 +1,10 @@
 #include "DS_Filter.h"
 #include "driver.h"
 #include "com.h"
-#include "module.h"
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
+#include "win32.h" // printf macro
 
 typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
 
@@ -145,7 +146,7 @@
 	object->vt->Release((IUnknown*)object);
 	if (result || !This->m_pFilter)
 	{
-	    em = "object does not have IBaseFilter interface";
+	    em = "object does not provide IBaseFilter interface";
             break;
 	}
 	// enumerate pins
@@ -228,7 +229,6 @@
             break;
 	}
 
-	printf("Using DirectShow codec: %s\n", dllname);
 	init++;
         break;
     }

Index: allocator.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/allocator.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- allocator.c	11 Dec 2001 23:29:24 -0000	1.6
+++ allocator.c	13 Sep 2002 19:43:15 -0000	1.7
@@ -2,9 +2,17 @@
 #include "com.h"
 #include "wine/winerror.h"
 #include <stdio.h>
+#include <stdlib.h>
 
 static int AllocatorKeeper = 0;
 
+struct _avm_list_t
+{
+    struct _avm_list_t* next;
+    struct _avm_list_t* prev;
+    void* member;
+};
+
 static inline int avm_list_size(avm_list_t* head)
 {
     avm_list_t* it = head;
@@ -100,7 +108,7 @@
     return NULL;
 }
 
-static long MemAllocator_CreateAllocator(GUID* clsid, GUID* iid, void** ppv)
+static long MemAllocator_CreateAllocator(GUID* clsid, const GUID* iid, void** ppv)
 {
     IMemAllocator* p;
     int result;

Index: allocator.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/allocator.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- allocator.h	26 Nov 2001 00:56:11 -0000	1.5
+++ allocator.h	13 Sep 2002 19:43:15 -0000	1.6
@@ -4,14 +4,9 @@
 #include "interfaces.h"
 #include "cmediasample.h"
 
-typedef struct avm_list_t
-{
-    struct avm_list_t* next;
-    struct avm_list_t* prev;
-    void* member;
-} avm_list_t;
-
+typedef struct _avm_list_t avm_list_t;
 typedef struct _MemAllocator MemAllocator;
+
 struct _MemAllocator
 {
     IMemAllocator_vt* vt;

Index: cmediasample.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/cmediasample.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cmediasample.c	11 Dec 2001 23:29:24 -0000	1.7
+++ cmediasample.c	13 Sep 2002 19:43:15 -0000	1.8
@@ -2,9 +2,10 @@
 #include "wine/winerror.h"
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 static long STDCALL CMediaSample_QueryInterface(IUnknown* This,
-						/* [in] */ IID* iid,
+						/* [in] */ const GUID* iid,
 						/* [iid_is][out] */ void **ppv)
 {
     Debug printf("CMediaSample_QueryInterface(%p) called\n", This);

Index: guids.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/guids.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- guids.c	23 Jun 2002 16:03:08 -0000	1.5
+++ guids.c	13 Sep 2002 19:43:15 -0000	1.6
@@ -1,68 +1,67 @@
 #include "guids.h"
 int DSHOW_DEBUG = 0;
 
-GUID CLSID_DivxDecompressorCF={0x82CCd3E0, 0xF71A, 0x11D0,
+const GUID CLSID_DivxDecompressorCF={0x82CCd3E0, 0xF71A, 0x11D0,
     { 0x9f, 0xe5, 0x00, 0x60, 0x97, 0x78, 0xaa, 0xaa}};
-GUID IID_IDivxFilterInterface={0xd132ee97, 0x3e38, 0x4030,
+const GUID IID_IDivxFilterInterface={0xd132ee97, 0x3e38, 0x4030,
     {0x8b, 0x17, 0x59, 0x16, 0x3b, 0x30, 0xa1, 0xf5}};
 
-GUID CLSID_IV50_Decoder={0x30355649, 0x0000, 0x0010,
+const GUID CLSID_IV50_Decoder={0x30355649, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID IID_IBaseFilter={0x56a86895, 0x0ad4, 0x11ce,
+const GUID IID_IBaseFilter={0x56a86895, 0x0ad4, 0x11ce,
     {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID IID_IEnumPins={0x56a86892, 0x0ad4, 0x11ce,
+const GUID IID_IEnumPins={0x56a86892, 0x0ad4, 0x11ce,
     {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID IID_IEnumMediaTypes={0x89c31040, 0x846b, 0x11ce,
+const GUID IID_IEnumMediaTypes={0x89c31040, 0x846b, 0x11ce,
     {0x97, 0xd3, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
-GUID IID_IMemInputPin={0x56a8689d, 0x0ad4, 0x11ce,
+const GUID IID_IMemInputPin={0x56a8689d, 0x0ad4, 0x11ce,
     {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID IID_IMemAllocator={0x56a8689c, 0x0ad4, 0x11ce,
+const GUID IID_IMemAllocator={0x56a8689c, 0x0ad4, 0x11ce,
     {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID IID_IMediaSample={0x56a8689a, 0x0ad4, 0x11ce,
+const GUID IID_IMediaSample={0x56a8689a, 0x0ad4, 0x11ce,
     {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
 
-GUID MEDIATYPE_Video={0x73646976, 0x0000, 0x0010,
+const GUID MEDIATYPE_Video={0x73646976, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID GUID_NULL={0x0, 0x0, 0x0,
+const GUID GUID_NULL={0x0, 0x0, 0x0,
     {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}};
-GUID FORMAT_VideoInfo={0x05589f80, 0xc356, 0x11ce,
+const GUID FORMAT_VideoInfo={0x05589f80, 0xc356, 0x11ce,
     {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
-GUID MEDIASUBTYPE_RGB565={0xe436eb7b, 0x524f, 0x11ce,
+const GUID MEDIASUBTYPE_RGB565={0xe436eb7b, 0x524f, 0x11ce,
     {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID MEDIASUBTYPE_RGB555={0xe436eb7c, 0x524f, 0x11ce,
+const GUID MEDIASUBTYPE_RGB555={0xe436eb7c, 0x524f, 0x11ce,
     {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID MEDIASUBTYPE_RGB24={0xe436eb7d, 0x524f, 0x11ce,
+const GUID MEDIASUBTYPE_RGB24={0xe436eb7d, 0x524f, 0x11ce,
     {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID MEDIASUBTYPE_RGB32={0xe436eb7e, 0x524f, 0x11ce,
+const GUID MEDIASUBTYPE_RGB32={0xe436eb7e, 0x524f, 0x11ce,
     {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
-GUID MEDIASUBTYPE_YUYV={0x56595559, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_YUYV={0x56595559, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_IYUV={0x56555949, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_IYUV={0x56555949, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_YVU9={0x39555659, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_YVU9={0x39555659, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_Y411={0x31313459, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_Y411={0x31313459, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_Y41P={0x50313459, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_Y41P={0x50313459, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_YUY2={0x32595559, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_YUY2={0x32595559, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_YVYU={0x55595659, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_YVYU={0x55595659, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_UYVY={0x59565955, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_UYVY={0x59565955, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_Y211={0x31313259, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_Y211={0x31313259, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_YV12={0x32315659, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_YV12={0x32315659, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_I420={0x30323449, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_I420={0x30323449, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID MEDIASUBTYPE_IF09={0x39304649, 0x0000, 0x0010,
+const GUID MEDIASUBTYPE_IF09={0x39304649, 0x0000, 0x0010,
     {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-GUID CLSID_MemoryAllocator={0x1e651cc0, 0xb199, 0x11d0,
+const GUID CLSID_MemoryAllocator={0x1e651cc0, 0xb199, 0x11d0,
     {0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45}};
-GUID IID_DivxHidden={0x598eba01, 0xb49a, 0x11d2,
+const GUID IID_DivxHidden={0x598eba01, 0xb49a, 0x11d2,
     {0xa1, 0xc1, 0x00, 0x60, 0x97, 0x78, 0xaa, 0xaa}};
-GUID IID_Iv50Hidden={0x665a4442, 0xd905, 0x11d0,
+const GUID IID_Iv50Hidden={0x665a4442, 0xd905, 0x11d0,
     {0xa3, 0x0e, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}};
-

Index: guids.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/guids.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- guids.h	23 Jun 2002 16:03:08 -0000	1.6
+++ guids.h	13 Sep 2002 19:43:15 -0000	1.7
@@ -1,5 +1,5 @@
-#ifndef GUIDS_H
-#define GUIDS_H
+#ifndef DS_GUIDS_H
+#define DS_GUIDS_H
 
 #include "com.h"
 #include "wine/module.h"
@@ -22,12 +22,6 @@
     char*	pbFormat;		//0x44
 } AM_MEDIA_TYPE;
 
-typedef enum
-{
-    PINDIR_INPUT = 0,
-    PINDIR_OUTPUT
-} PIN_DIRECTION;
-
 typedef long long REFERENCE_TIME;
 
 typedef struct __attribute__((__packed__)) RECT32
@@ -35,8 +29,8 @@
     int left, top, right, bottom;
 } RECT32;
 
-typedef struct __attribute__((__packed__)) tagVIDEOINFOHEADER {
-
+typedef struct __attribute__((__packed__)) tagVIDEOINFOHEADER
+{
     RECT32            rcSource;          // The bit we really want to use
     RECT32            rcTarget;          // Where the video should go
     unsigned long     dwBitRate;         // Approximate bit data rate
@@ -46,52 +40,39 @@
     //int               reserved[3];
 } VIDEOINFOHEADER;
 
-typedef struct _AllocatorProperties
-{
-    long cBuffers;
-    long cbBuffer;
-    long cbAlign;
-    long cbPrefix;
-} ALLOCATOR_PROPERTIES;
+typedef GUID CLSID;
+typedef GUID IID;
 
-typedef struct _IBaseFilter IBaseFilter;
-typedef struct _PinInfo
-{
-    IBaseFilter* pFilter;
-    PIN_DIRECTION dir;
-    unsigned short achName[128];
-} PIN_INFO;
-
-
-extern GUID IID_IBaseFilter;
-extern GUID IID_IEnumPins;
-extern GUID IID_IEnumMediaTypes;
-extern GUID IID_IMemInputPin;
-extern GUID IID_IMemAllocator;
-extern GUID IID_IMediaSample;
-extern GUID IID_DivxHidden;
-extern GUID IID_Iv50Hidden;
-extern GUID CLSID_DivxDecompressorCF;
-extern GUID IID_IDivxFilterInterface;
-extern GUID CLSID_IV50_Decoder;
-extern GUID CLSID_MemoryAllocator;
-extern GUID MEDIATYPE_Video;
-extern GUID GUID_NULL;
-extern GUID FORMAT_VideoInfo;
-extern GUID MEDIASUBTYPE_RGB565;
-extern GUID MEDIASUBTYPE_RGB555;
-extern GUID MEDIASUBTYPE_RGB24;
-extern GUID MEDIASUBTYPE_RGB32;
-extern GUID MEDIASUBTYPE_YUYV;
-extern GUID MEDIASUBTYPE_IYUV;
-extern GUID MEDIASUBTYPE_YVU9;
-extern GUID MEDIASUBTYPE_Y411;
-extern GUID MEDIASUBTYPE_Y41P;
-extern GUID MEDIASUBTYPE_YUY2;
-extern GUID MEDIASUBTYPE_YVYU;
-extern GUID MEDIASUBTYPE_UYVY;
-extern GUID MEDIASUBTYPE_Y211;
-extern GUID MEDIASUBTYPE_YV12;
-extern GUID MEDIASUBTYPE_I420;
+extern const GUID IID_IBaseFilter;
+extern const GUID IID_IEnumPins;
+extern const GUID IID_IEnumMediaTypes;
+extern const GUID IID_IMemInputPin;
+extern const GUID IID_IMemAllocator;
+extern const GUID IID_IMediaSample;
+extern const GUID IID_DivxHidden;
+extern const GUID IID_Iv50Hidden;
+extern const GUID CLSID_DivxDecompressorCF;
+extern const GUID IID_IDivxFilterInterface;
+extern const GUID CLSID_IV50_Decoder;
+extern const GUID CLSID_MemoryAllocator;
+extern const GUID MEDIATYPE_Video;
+extern const GUID GUID_NULL;
+extern const GUID FORMAT_VideoInfo;
+extern const GUID MEDIASUBTYPE_RGB565;
+extern const GUID MEDIASUBTYPE_RGB555;
+extern const GUID MEDIASUBTYPE_RGB24;
+extern const GUID MEDIASUBTYPE_RGB32;
+extern const GUID MEDIASUBTYPE_YUYV;
+extern const GUID MEDIASUBTYPE_IYUV;
+extern const GUID MEDIASUBTYPE_YVU9;
+extern const GUID MEDIASUBTYPE_Y411;
+extern const GUID MEDIASUBTYPE_Y41P;
+extern const GUID MEDIASUBTYPE_YUY2;
+extern const GUID MEDIASUBTYPE_YVYU;
+extern const GUID MEDIASUBTYPE_UYVY;
+extern const GUID MEDIASUBTYPE_Y211;
+extern const GUID MEDIASUBTYPE_YV12;
+extern const GUID MEDIASUBTYPE_I420;
+extern const GUID MEDIASUBTYPE_IF09;
 
-#endif
+#endif /* DS_GUIDS_H */

Index: inputpin.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/inputpin.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- inputpin.c	11 Dec 2001 23:29:24 -0000	1.6
+++ inputpin.c	13 Sep 2002 19:43:15 -0000	1.7
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-static int unimplemented(const char* s, void* p)
+static inline int unimplemented(const char* s, void* p)
 {
     Debug printf("%s(%p) called (UNIMPLEMENTED)", s, p);
     return E_NOTIMPL;

Index: inputpin.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/inputpin.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- inputpin.h	11 Dec 2001 23:29:24 -0000	1.5
+++ inputpin.h	13 Sep 2002 19:43:15 -0000	1.6
@@ -33,20 +33,19 @@
 CBaseFilter* CBaseFilterCreate(const AM_MEDIA_TYPE* vhdr, CBaseFilter2* parent);
 
 
-typedef struct _CInputPin CInputPin;
-struct _CInputPin
+typedef struct
 {
     IPin_vt* vt;
     DECLARE_IUNKNOWN();
     CBaseFilter* parent;
     AM_MEDIA_TYPE type;
     GUID interfaces[1];
-};
+} CInputPin;
 
 CInputPin* CInputPinCreate(CBaseFilter* parent, const AM_MEDIA_TYPE* vhdr);
 
 
-typedef struct CRemotePin
+typedef struct
 {
     IPin_vt* vt;
     DECLARE_IUNKNOWN();
@@ -58,7 +57,7 @@
 CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin);
 
 
-typedef struct CRemotePin2
+typedef struct
 {
     IPin_vt* vt;
     DECLARE_IUNKNOWN();

Index: interfaces.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/interfaces.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- interfaces.h	11 Dec 2001 23:29:24 -0000	1.7
+++ interfaces.h	13 Sep 2002 19:43:15 -0000	1.8
@@ -2,26 +2,41 @@
 #define DS_INTERFACES_H
 
 /*
-
-Definition of important DirectShow interfaces.
-Created using freely-available DirectX 8.0 SDK
-( http://msdn.microsoft.com )
-
-*/
+ * Definition of important DirectShow interfaces.
+ * Created using freely-available DirectX 8.0 SDK
+ * ( http://msdn.microsoft.com )
+ */
 
 #include "iunk.h"
 #include "com.h"
 
-//typedef GUID& REFIID;
-typedef GUID CLSID;
-typedef GUID IID;
-
 /*    Sh*t. MSVC++ and g++ use different methods of storing vtables.    */
 
 typedef struct _IReferenceClock IReferenceClock;
 typedef struct _IFilterGraph IFilterGraph;
 
-enum PIN_DIRECTION;
+typedef struct _IBaseFilter IBaseFilter;
+
+typedef enum
+{
+    PINDIR_INPUT = 0,
+    PINDIR_OUTPUT
+} PIN_DIRECTION;
+
+typedef struct _PinInfo
+{
+    IBaseFilter* pFilter;
+    PIN_DIRECTION dir;
+    unsigned short achName[128];
+} PIN_INFO;
+
+typedef struct _AllocatorProperties
+{
+    long cBuffers;
+    long cbBuffer;
+    long cbAlign;
+    long cbPrefix;
+} ALLOCATOR_PROPERTIES;
 
 typedef struct _IEnumMediaTypes IEnumMediaTypes;
 typedef struct IEnumMediaTypes_vt

Index: iunk.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/iunk.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- iunk.h	21 Nov 2001 19:12:39 -0000	1.3
+++ iunk.h	13 Sep 2002 19:43:15 -0000	1.4
@@ -2,10 +2,9 @@
 #define DS_IUNK_H
 
 #include "guids.h"
-#include <stdlib.h>
 
 #define INHERIT_IUNKNOWN() \
-    long STDCALL ( *QueryInterface )(IUnknown * This, GUID* riid, void **ppvObject); \
+    long STDCALL ( *QueryInterface )(IUnknown * This, const GUID* riid, void **ppvObject); \
     long STDCALL ( *AddRef )(IUnknown * This); \
     long STDCALL ( *Release )(IUnknown * This);
 
@@ -14,7 +13,7 @@
 
 #define IMPLEMENT_IUNKNOWN(CLASSNAME) 		\
 static long STDCALL CLASSNAME ## _QueryInterface(IUnknown * This, \
-					  GUID* riid, void **ppvObject) \
+					  const GUID* riid, void **ppvObject) \
 { \
     CLASSNAME * me = (CLASSNAME *)This;		\
     GUID* r; unsigned int i = 0;		\

Index: outputpin.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/outputpin.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- outputpin.c	11 Dec 2001 23:29:24 -0000	1.9
+++ outputpin.c	13 Sep 2002 19:43:15 -0000	1.10
@@ -4,13 +4,14 @@
 #include "outputpin.h"
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 /*
     An object beyond interface IEnumMediaTypes.
     Returned by COutputPin through call IPin::EnumMediaTypes().
 */
 
-static int unimplemented(const char* s, void* p)
+static inline int output_unimplemented(const char* s, void* p)
 {
     Debug printf("%s(%p) called (UNIMPLEMENTED)", s, p);
     return E_NOTIMPL;
@@ -24,6 +25,15 @@
     GUID interfaces[2];
 } CEnumMediaTypes;
 
+struct _COutputMemPin
+{
+    IMemInputPin_vt* vt;
+    DECLARE_IUNKNOWN();
+    char** frame_pointer;
+    long* frame_size_pointer;
+    MemAllocator* pAllocator;
+    COutputPin* parent;
+};
 
 static HRESULT STDCALL CEnumMediaTypes_Next(IEnumMediaTypes * This,
 					    /* [in] */ ULONG cMediaTypes,
@@ -58,8 +68,7 @@
 static HRESULT STDCALL CEnumMediaTypes_Skip(IEnumMediaTypes * This,
 					    /* [in] */ ULONG cMediaTypes)
 {
-    Debug unimplemented("CEnumMediaTypes::Skip", This);
-    return E_NOTIMPL;
+    return output_unimplemented("CEnumMediaTypes::Skip", This);
 }
 
 static HRESULT STDCALL CEnumMediaTypes_Reset(IEnumMediaTypes * This)
@@ -121,7 +130,7 @@
  *************/
 
 
-static HRESULT STDCALL COutputPin_QueryInterface(IUnknown* This, GUID* iid, void** ppv)
+static HRESULT STDCALL COutputPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv)
 {
     COutputPin* p = (COutputPin*) This;
 
@@ -214,8 +223,7 @@
 static HRESULT STDCALL COutputPin_QueryPinInfo(IPin * This,
 					       /* [out] */ PIN_INFO *pInfo)
 {
-    Debug unimplemented("COutputPin_QueryPinInfo", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_QueryPinInfo", This);
 }
 
 static HRESULT STDCALL COutputPin_QueryDirection(IPin * This,
@@ -231,15 +239,13 @@
 static HRESULT STDCALL COutputPin_QueryId(IPin * This,
 					  /* [out] */ LPWSTR *Id)
 {
-    Debug unimplemented("COutputPin_QueryId", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_QueryId", This);
 }
 
 static HRESULT STDCALL COutputPin_QueryAccept(IPin * This,
 					      /* [in] */ const AM_MEDIA_TYPE *pmt)
 {
-    Debug unimplemented("COutputPin_QueryAccept", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_QueryAccept", This);
 }
 
 static HRESULT STDCALL COutputPin_EnumMediaTypes(IPin * This,
@@ -256,26 +262,22 @@
 						     /* [out] */ IPin **apPin,
 						     /* [out][in] */ ULONG *nPin)
 {
-    Debug unimplemented("COutputPin_QueryInternalConnections", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_QueryInternalConnections", This);
 }
 
 static HRESULT STDCALL COutputPin_EndOfStream(IPin * This)
 {
-    Debug unimplemented("COutputPin_EndOfStream", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_EndOfStream", This);
 }
 
 static HRESULT STDCALL COutputPin_BeginFlush(IPin * This)
 {
-    Debug unimplemented("COutputPin_BeginFlush", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_BeginFlush", This);
 }
 
 static HRESULT STDCALL COutputPin_EndFlush(IPin * This)
 {
-    Debug unimplemented("COutputPin_EndFlush", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_EndFlush", This);
 }
 
 static HRESULT STDCALL COutputPin_NewSegment(IPin * This,
@@ -292,7 +294,7 @@
 
 // IMemInputPin->IUnknown methods
 
-static HRESULT STDCALL COutputPin_M_QueryInterface(IUnknown* This, GUID* iid, void** ppv)
+static HRESULT STDCALL COutputPin_M_QueryInterface(IUnknown* This, const GUID* iid, void** ppv)
 {
     COutputPin* p = (COutputPin*)This;
 
@@ -351,8 +353,7 @@
 static HRESULT STDCALL COutputPin_GetAllocatorRequirements(IMemInputPin* This,
 							   /* [out] */ ALLOCATOR_PROPERTIES* pProps)
 {
-    Debug unimplemented("COutputPin_GetAllocatorRequirements", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_GetAllocatorRequirements", This);
 }
 
 static HRESULT STDCALL COutputPin_Receive(IMemInputPin* This,
@@ -395,14 +396,12 @@
 					    /* [in] */ long nSamples,
 					    /* [out] */ long *nSamplesProcessed)
 {
-    Debug unimplemented("COutputPin_ReceiveMultiple", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_ReceiveMultiple", This);
 }
 
 static HRESULT STDCALL COutputPin_ReceiveCanBlock(IMemInputPin * This)
 {
-    Debug unimplemented("COutputPin_ReceiveCanBlock", This);
-    return E_NOTIMPL;
+    return output_unimplemented("COutputPin_ReceiveCanBlock", This);
 }
 
 static void COutputPin_SetFramePointer(COutputPin* This, char** z)

Index: outputpin.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/outputpin.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- outputpin.h	26 Nov 2001 00:56:11 -0000	1.5
+++ outputpin.h	13 Sep 2002 19:43:15 -0000	1.6
@@ -5,18 +5,8 @@
 
 #include "allocator.h"
 
-typedef struct _COutputPin COutputPin;
-
 typedef struct _COutputMemPin COutputMemPin;
-struct _COutputMemPin
-{
-    IMemInputPin_vt* vt;
-    DECLARE_IUNKNOWN();
-    char** frame_pointer;
-    long* frame_size_pointer;
-    MemAllocator* pAllocator;
-    COutputPin* parent;
-};
+typedef struct _COutputPin COutputPin;
 
 struct _COutputPin
 {




More information about the MPlayer-cvslog mailing list