Module: wine Branch: master Commit: e78ea286fbf496b584029468b1e8173601d09495 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e78ea286fbf496b584029468b1...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Dec 2 15:25:19 2008 +0100
quartz: Make some functions and variables static.
---
dlls/quartz/filtermapper.c | 2 +- dlls/quartz/main.c | 20 --------------- dlls/quartz/memallocator.c | 56 +++++++++++++++++++++-------------------- dlls/quartz/parser.c | 2 +- dlls/quartz/quartz_private.h | 34 ------------------------- 5 files changed, 31 insertions(+), 83 deletions(-)
diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 5732755..ce296ea 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -81,7 +81,7 @@ struct IAMFilterData { const IAMFilterDataVtbl *lpVtbl; }; -const GUID IID_IAMFilterData = { +static const GUID IID_IAMFilterData = { 0x97f7c4d4, 0x547b, 0x4a5f, { 0x83,0x32, 0x53,0x64,0x30,0xad,0x2e,0x4d } };
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 5eece59..6b4c135 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -241,26 +241,6 @@ const char * qzdebugstr_guid( const GUID * id ) return debugstr_guid(id); }
-/*********************************************************************** - * qzdebugstr_State (internal) - * - * Gives a text version of the FILTER_STATE enumeration - */ -const char * qzdebugstr_State(FILTER_STATE state) -{ - switch (state) - { - case State_Stopped: - return "State_Stopped"; - case State_Running: - return "State_Running"; - case State_Paused: - return "State_Paused"; - default: - return "State_Unknown"; - } -} - LONG WINAPI AmpFactorToDB(LONG ampfactor) { FIXME("(%d) Stub!\n", ampfactor); diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 1718d19..ae25459 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -31,24 +31,26 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-void dump_AM_SAMPLE2_PROPERTIES(const AM_SAMPLE2_PROPERTIES * pProps) -{ - if (!pProps) - { - TRACE("AM_SAMPLE2_PROPERTIES: (null)\n"); - return; - } - TRACE("\tcbData: %d\n", pProps->cbData); - TRACE("\tdwTypeSpecificFlags: 0x%8x\n", pProps->dwTypeSpecificFlags); - TRACE("\tdwSampleFlags: 0x%8x\n", pProps->dwSampleFlags); - TRACE("\tlActual: %d\n", pProps->lActual); - TRACE("\ttStart: %x%08x%s\n", (LONG)(pProps->tStart >> 32), (LONG)pProps->tStart, pProps->dwSampleFlags & AM_SAMPLE_TIMEVALID ? "" : " (not valid)"); - TRACE("\ttStop: %x%08x%s\n", (LONG)(pProps->tStop >> 32), (LONG)pProps->tStop, pProps->dwSampleFlags & AM_SAMPLE_STOPVALID ? "" : " (not valid)"); - TRACE("\tdwStreamId: 0x%x\n", pProps->dwStreamId); - TRACE("\tpMediaType: %p\n", pProps->pMediaType); - TRACE("\tpbBuffer: %p\n", pProps->pbBuffer); - TRACE("\tcbBuffer: %d\n", pProps->cbBuffer); -} +typedef struct BaseMemAllocator +{ + const IMemAllocatorVtbl * lpVtbl; + + LONG ref; + ALLOCATOR_PROPERTIES props; + HRESULT (* fnAlloc) (IMemAllocator *); + HRESULT (* fnFree)(IMemAllocator *); + HRESULT (* fnVerify)(IMemAllocator *, ALLOCATOR_PROPERTIES *); + HRESULT (* fnBufferPrepare)(IMemAllocator *, StdMediaSample2 *, DWORD flags); + HRESULT (* fnBufferReleased)(IMemAllocator *, StdMediaSample2 *); + void (* fnDestroyed)(IMemAllocator *); + HANDLE hSemWaiting; + BOOL bDecommitQueued; + BOOL bCommitted; + LONG lWaiting; + struct list free_list; + struct list used_list; + CRITICAL_SECTION *pCritSect; +} BaseMemAllocator;
static const IMemAllocatorVtbl BaseMemAllocator_VTable; static const IMediaSample2Vtbl StdMediaSample2_VTable; @@ -57,14 +59,14 @@ static const IMediaSample2Vtbl StdMediaSample2_VTable;
#define INVALID_MEDIA_TIME (((ULONGLONG)0x7fffffff << 32) | 0xffffffff)
-HRESULT BaseMemAllocator_Init(HRESULT (* fnAlloc)(IMemAllocator *), - HRESULT (* fnFree)(IMemAllocator *), - HRESULT (* fnVerify)(IMemAllocator *, ALLOCATOR_PROPERTIES *), - HRESULT (* fnBufferPrepare)(IMemAllocator *, StdMediaSample2 *, DWORD), - HRESULT (* fnBufferReleased)(IMemAllocator *, StdMediaSample2 *), - void (* fnDestroyed)(IMemAllocator *), - CRITICAL_SECTION *pCritSect, - BaseMemAllocator * pMemAlloc) +static HRESULT BaseMemAllocator_Init(HRESULT (* fnAlloc)(IMemAllocator *), + HRESULT (* fnFree)(IMemAllocator *), + HRESULT (* fnVerify)(IMemAllocator *, ALLOCATOR_PROPERTIES *), + HRESULT (* fnBufferPrepare)(IMemAllocator *, StdMediaSample2 *, DWORD), + HRESULT (* fnBufferReleased)(IMemAllocator *, StdMediaSample2 *), + void (* fnDestroyed)(IMemAllocator *), + CRITICAL_SECTION *pCritSect, + BaseMemAllocator * pMemAlloc) { assert(fnAlloc && fnFree && fnDestroyed);
@@ -399,7 +401,7 @@ static const IMemAllocatorVtbl BaseMemAllocator_VTable = BaseMemAllocator_ReleaseBuffer };
-HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAllocator * pParent, StdMediaSample2 ** ppSample) +static HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAllocator * pParent, StdMediaSample2 ** ppSample) { assert(pbBuffer && pParent && (cbBuffer > 0));
@@ -423,7 +425,7 @@ HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAllocator return S_OK; }
-void StdMediaSample2_Delete(StdMediaSample2 * This) +static void StdMediaSample2_Delete(StdMediaSample2 * This) { /* NOTE: does not remove itself from the list it belongs to */ CoTaskMemFree(This); diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 59ff427..147ae88 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -747,7 +747,7 @@ static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface) return hr; }
-HRESULT WINAPI Parser_PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI Parser_PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { HRESULT hr;
diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index e025078..3e0dfe1 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -76,7 +76,6 @@ HRESULT IEnumRegFiltersImpl_Construct(REGFILTER * pInRegFilters, const ULONG siz HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEnumFilters ** ppEnum);
extern const char * qzdebugstr_guid(const GUID * id); -extern const char * qzdebugstr_State(FILTER_STATE state);
HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc); void FreeMediaType(AM_MEDIA_TYPE * pmt); @@ -97,37 +96,4 @@ typedef struct StdMediaSample2 LONGLONG tMediaEnd; } StdMediaSample2;
-typedef struct BaseMemAllocator -{ - const IMemAllocatorVtbl * lpVtbl; - - LONG ref; - ALLOCATOR_PROPERTIES props; - HRESULT (* fnAlloc) (IMemAllocator *); - HRESULT (* fnFree)(IMemAllocator *); - HRESULT (* fnVerify)(IMemAllocator *, ALLOCATOR_PROPERTIES *); - HRESULT (* fnBufferPrepare)(IMemAllocator *, StdMediaSample2 *, DWORD flags); - HRESULT (* fnBufferReleased)(IMemAllocator *, StdMediaSample2 *); - void (* fnDestroyed)(IMemAllocator *); - HANDLE hSemWaiting; - BOOL bDecommitQueued; - BOOL bCommitted; - LONG lWaiting; - struct list free_list; - struct list used_list; - CRITICAL_SECTION *pCritSect; -} BaseMemAllocator; - -HRESULT BaseMemAllocator_Init(HRESULT (* fnAlloc)(IMemAllocator *), - HRESULT (* fnFree)(IMemAllocator *), - HRESULT (* fnVerify)(IMemAllocator *, ALLOCATOR_PROPERTIES *), - HRESULT (* fnBufferPrepare)(IMemAllocator *, StdMediaSample2 *, DWORD), - HRESULT (* fnBufferReleased)(IMemAllocator *, StdMediaSample2 *), - void (* fnDestroyed)(IMemAllocator *), - CRITICAL_SECTION *pCritSect, - BaseMemAllocator * pMemAlloc); - -HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAllocator * pParent, StdMediaSample2 ** ppSample); -void StdMediaSample2_Delete(StdMediaSample2 * This); - #endif /* __QUARTZ_PRIVATE_INCLUDED__ */