source: trunk/src/quartz/imem.c@ 6563

Last change on this file since 6563 was 6563, checked in by sandervl, 24 years ago

created

File size: 2.7 KB
Line 
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"
20DEFAULT_DEBUG_CHANNEL(quartz);
21
22#include "quartz_private.h"
23#include "memalloc.h"
24
25
26static HRESULT WINAPI
27IMemAllocator_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
36static ULONG WINAPI
37IMemAllocator_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
46static ULONG WINAPI
47IMemAllocator_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
56static HRESULT WINAPI
57IMemAllocator_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
65static HRESULT WINAPI
66IMemAllocator_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
74static HRESULT WINAPI
75IMemAllocator_fnCommit(IMemAllocator* iface)
76{
77 CMemoryAllocator_THIS(iface,memalloc);
78
79 FIXME( "(%p)->() stub!\n", This );
80 return E_NOTIMPL;
81}
82
83static HRESULT WINAPI
84IMemAllocator_fnDecommit(IMemAllocator* iface)
85{
86 CMemoryAllocator_THIS(iface,memalloc);
87
88 FIXME( "(%p)->() stub!\n", This );
89 return E_NOTIMPL;
90}
91
92static HRESULT WINAPI
93IMemAllocator_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
101static HRESULT WINAPI
102IMemAllocator_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
112static 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
129void CMemoryAllocator_InitIMemAllocator( CMemoryAllocator* pma )
130{
131 TRACE("(%p)\n",pma);
132 ICOM_VTBL(&pma->memalloc) = &imemalloc;
133}
Note: See TracBrowser for help on using the repository browser.