Various cosmetic changes.
[wine] / dlls / quartz / memalloc.h
1 #ifndef WINE_DSHOW_MEMALLOC_H
2 #define WINE_DSHOW_MEMALLOC_H
3
4 /*
5                 implements CLSID_MemoryAllocator.
6
7         - At least, the following interfaces should be implemented:
8
9         IUnknown
10                 + IMemAllocator
11
12 */
13
14 #include "iunk.h"
15 #include "sample.h"
16
17 typedef struct MA_IMemAllocatorImpl
18 {
19         ICOM_VFIELD(IMemAllocator);
20 } MA_IMemAllocatorImpl;
21
22 typedef struct CMemoryAllocator
23 {
24         QUARTZ_IUnkImpl unk;
25         MA_IMemAllocatorImpl    memalloc;
26
27         /* IMemAllocator fields. */
28         CRITICAL_SECTION        csMem;
29         ALLOCATOR_PROPERTIES    prop;
30         HANDLE  hEventSample;
31         BYTE*   pData;
32         CMemMediaSample**       ppSamples;
33 } CMemoryAllocator;
34
35 #define CMemoryAllocator_THIS(iface,member)             CMemoryAllocator*       This = ((CMemoryAllocator*)(((char*)iface)-offsetof(CMemoryAllocator,member)))
36
37 HRESULT QUARTZ_CreateMemoryAllocator(IUnknown* punkOuter,void** ppobj);
38
39 HRESULT CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma );
40 void CMemoryAllocator_UninitIMemAllocator( CMemoryAllocator* pma );
41
42
43 #endif  /* WINE_DSHOW_MEMALLOC_H */