Mercurial > mplayer.hg
comparison loader/dshow/allocator.h @ 168:bdc4a8fc04d8
Initial revision
author | arpi_esp |
---|---|
date | Tue, 20 Mar 2001 00:05:27 +0000 |
parents | |
children | 9355b2ae634e |
comparison
equal
deleted
inserted
replaced
167:53f289e99102 | 168:bdc4a8fc04d8 |
---|---|
1 #ifndef ALLOCATOR_H | |
2 #define ALLOCATOR_H | |
3 | |
4 #include "interfaces.h" | |
5 #include "cmediasample.h" | |
6 #include <list> | |
7 #include "iunk.h" | |
8 #include "default.h" | |
9 using namespace std; | |
10 class MemAllocator: public IMemAllocator | |
11 { | |
12 ALLOCATOR_PROPERTIES props; | |
13 list<CMediaSample*> used_list; | |
14 list<CMediaSample*> free_list; | |
15 static GUID interfaces[]; | |
16 DECLARE_IUNKNOWN(MemAllocator) | |
17 public: | |
18 MemAllocator(); | |
19 ~MemAllocator(){delete vt;} | |
20 static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv); | |
21 | |
22 static HRESULT STDCALL SetProperties ( | |
23 IMemAllocator * This, | |
24 /* [in] */ ALLOCATOR_PROPERTIES *pRequest, | |
25 /* [out] */ ALLOCATOR_PROPERTIES *pActual); | |
26 | |
27 static HRESULT STDCALL GetProperties ( | |
28 IMemAllocator * This, | |
29 /* [out] */ ALLOCATOR_PROPERTIES *pProps); | |
30 | |
31 static HRESULT STDCALL Commit ( | |
32 IMemAllocator * This); | |
33 | |
34 static HRESULT STDCALL Decommit ( | |
35 IMemAllocator * This); | |
36 | |
37 static HRESULT STDCALL GetBuffer ( | |
38 IMemAllocator * This, | |
39 /* [out] */ IMediaSample **ppBuffer, | |
40 /* [in] */ REFERENCE_TIME *pStartTime, | |
41 /* [in] */ REFERENCE_TIME *pEndTime, | |
42 /* [in] */ DWORD dwFlags); | |
43 | |
44 static HRESULT STDCALL ReleaseBuffer ( | |
45 IMemAllocator * This, | |
46 /* [in] */ IMediaSample *pBuffer); | |
47 }; | |
48 | |
49 #endif |