1 | /*
|
---|
2 | * Implementation of CLSID_MemoryAllocator.
|
---|
3 | *
|
---|
4 | * FIXME - stub.
|
---|
5 | *
|
---|
6 | * hidenori@a2.ctktv.ne.jp
|
---|
7 | */
|
---|
8 |
|
---|
9 | #include "config.h"
|
---|
10 |
|
---|
11 | #include "windef.h"
|
---|
12 | #include "winbase.h"
|
---|
13 | #include "wingdi.h"
|
---|
14 | #include "winerror.h"
|
---|
15 | #include "wine/obj_base.h"
|
---|
16 | #include "strmif.h"
|
---|
17 | #include "uuids.h"
|
---|
18 |
|
---|
19 | #include "debugtools.h"
|
---|
20 | DEFAULT_DEBUG_CHANNEL(quartz);
|
---|
21 |
|
---|
22 | #include "quartz_private.h"
|
---|
23 | #include "memalloc.h"
|
---|
24 |
|
---|
25 |
|
---|
26 | static HRESULT WINAPI
|
---|
27 | IMemAllocator_fnQueryInterface(IMemAllocator* iface,REFIID riid,void** ppobj)
|
---|
28 | {
|
---|
29 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
30 |
|
---|
31 | TRACE("(%p)->()\n",This);
|
---|
32 |
|
---|
33 | return IUnknown_QueryInterface((IUnknown*)(&This->unk),riid,ppobj);
|
---|
34 | }
|
---|
35 |
|
---|
36 | static ULONG WINAPI
|
---|
37 | IMemAllocator_fnAddRef(IMemAllocator* iface)
|
---|
38 | {
|
---|
39 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
40 |
|
---|
41 | TRACE("(%p)->()\n",This);
|
---|
42 |
|
---|
43 | return IUnknown_AddRef((IUnknown*)(&This->unk));
|
---|
44 | }
|
---|
45 |
|
---|
46 | static ULONG WINAPI
|
---|
47 | IMemAllocator_fnRelease(IMemAllocator* iface)
|
---|
48 | {
|
---|
49 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
50 |
|
---|
51 | TRACE("(%p)->()\n",This);
|
---|
52 |
|
---|
53 | return IUnknown_Release((IUnknown*)(&This->unk));
|
---|
54 | }
|
---|
55 |
|
---|
56 | static HRESULT WINAPI
|
---|
57 | IMemAllocator_fnSetProperties(IMemAllocator* iface,ALLOCATOR_PROPERTIES* pPropReq,ALLOCATOR_PROPERTIES* pPropActual)
|
---|
58 | {
|
---|
59 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
60 |
|
---|
61 | FIXME( "(%p)->() stub!\n", This );
|
---|
62 | return E_NOTIMPL;
|
---|
63 | }
|
---|
64 |
|
---|
65 | static HRESULT WINAPI
|
---|
66 | IMemAllocator_fnGetProperties(IMemAllocator* iface,ALLOCATOR_PROPERTIES* pProp)
|
---|
67 | {
|
---|
68 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
69 |
|
---|
70 | FIXME( "(%p)->() stub!\n", This );
|
---|
71 | return E_NOTIMPL;
|
---|
72 | }
|
---|
73 |
|
---|
74 | static HRESULT WINAPI
|
---|
75 | IMemAllocator_fnCommit(IMemAllocator* iface)
|
---|
76 | {
|
---|
77 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
78 |
|
---|
79 | FIXME( "(%p)->() stub!\n", This );
|
---|
80 | return E_NOTIMPL;
|
---|
81 | }
|
---|
82 |
|
---|
83 | static HRESULT WINAPI
|
---|
84 | IMemAllocator_fnDecommit(IMemAllocator* iface)
|
---|
85 | {
|
---|
86 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
87 |
|
---|
88 | FIXME( "(%p)->() stub!\n", This );
|
---|
89 | return E_NOTIMPL;
|
---|
90 | }
|
---|
91 |
|
---|
92 | static HRESULT WINAPI
|
---|
93 | IMemAllocator_fnGetBuffer(IMemAllocator* iface,IMediaSample** ppSample,REFERENCE_TIME* prtStart,REFERENCE_TIME* prtEnd,DWORD dwFlags)
|
---|
94 | {
|
---|
95 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
96 |
|
---|
97 | FIXME( "(%p)->() stub!\n", This );
|
---|
98 | return E_NOTIMPL;
|
---|
99 | }
|
---|
100 |
|
---|
101 | static HRESULT WINAPI
|
---|
102 | IMemAllocator_fnReleaseBuffer(IMemAllocator* iface,IMediaSample* pSample)
|
---|
103 | {
|
---|
104 | CMemoryAllocator_THIS(iface,memalloc);
|
---|
105 |
|
---|
106 | FIXME( "(%p)->() stub!\n", This );
|
---|
107 | return E_NOTIMPL;
|
---|
108 | }
|
---|
109 |
|
---|
110 |
|
---|
111 |
|
---|
112 | static ICOM_VTABLE(IMemAllocator) imemalloc =
|
---|
113 | {
|
---|
114 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
115 | /* IUnknown fields */
|
---|
116 | IMemAllocator_fnQueryInterface,
|
---|
117 | IMemAllocator_fnAddRef,
|
---|
118 | IMemAllocator_fnRelease,
|
---|
119 | /* IMemAllocator fields */
|
---|
120 | IMemAllocator_fnSetProperties,
|
---|
121 | IMemAllocator_fnGetProperties,
|
---|
122 | IMemAllocator_fnCommit,
|
---|
123 | IMemAllocator_fnDecommit,
|
---|
124 | IMemAllocator_fnGetBuffer,
|
---|
125 | IMemAllocator_fnReleaseBuffer,
|
---|
126 | };
|
---|
127 |
|
---|
128 |
|
---|
129 | void CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma )
|
---|
130 | {
|
---|
131 | TRACE("(%p)\n",pma);
|
---|
132 | ICOM_VTBL(&pma->memalloc) = &imemalloc;
|
---|
133 | }
|
---|