diff options
Diffstat (limited to 'loader/dshow/allocator.h')
-rw-r--r-- | loader/dshow/allocator.h | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/loader/dshow/allocator.h b/loader/dshow/allocator.h index 4b26c67b79..1e9d7d5556 100644 --- a/loader/dshow/allocator.h +++ b/loader/dshow/allocator.h @@ -1,13 +1,13 @@ -#ifndef ALLOCATOR_H -#define ALLOCATOR_H +#ifndef DS_ALLOCATOR_H +#define DS_ALLOCATOR_H #include "interfaces.h" #include "cmediasample.h" -#include <list> #include "iunk.h" -#include "default.h" -class MemAllocator: public IMemAllocator +#include <list> + +struct MemAllocator: public IMemAllocator { ALLOCATOR_PROPERTIES props; std::list<CMediaSample*> used_list; @@ -16,44 +16,20 @@ class MemAllocator: public IMemAllocator CMediaSample* modified_sample; static GUID interfaces[]; DECLARE_IUNKNOWN(MemAllocator) -public: + MemAllocator(); - ~MemAllocator(){delete vt;} - static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv); + ~MemAllocator(); void SetPointer(char* pointer) { new_pointer=pointer; } void ResetPointer() { - if(modified_sample) + if (modified_sample) { modified_sample->ResetPointer(); modified_sample=0; } } - static HRESULT STDCALL SetProperties ( - IMemAllocator * This, - /* [in] */ ALLOCATOR_PROPERTIES *pRequest, - /* [out] */ ALLOCATOR_PROPERTIES *pActual); - - static HRESULT STDCALL GetProperties ( - IMemAllocator * This, - /* [out] */ ALLOCATOR_PROPERTIES *pProps); - - static HRESULT STDCALL Commit ( - IMemAllocator * This); - - static HRESULT STDCALL Decommit ( - IMemAllocator * This); - - static HRESULT STDCALL GetBuffer ( - IMemAllocator * This, - /* [out] */ IMediaSample **ppBuffer, - /* [in] */ REFERENCE_TIME *pStartTime, - /* [in] */ REFERENCE_TIME *pEndTime, - /* [in] */ DWORD dwFlags); - - static HRESULT STDCALL ReleaseBuffer ( - IMemAllocator * This, - /* [in] */ IMediaSample *pBuffer); + + static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv); }; -#endif +#endif /* DS_ALLOCATOR_H */ |