diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-20 00:05:27 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-20 00:05:27 +0000 |
commit | fbe693a169b346b4b4e48ee39017cf86b594429b (patch) | |
tree | f2a0d6aae01e6a560ce75bba7f68f53890b5b9b9 /loader/dshow/allocator.h | |
parent | caf48a3f5da35dd2e183da9f34ed265bf082856f (diff) | |
download | mpv-fbe693a169b346b4b4e48ee39017cf86b594429b.tar.bz2 mpv-fbe693a169b346b4b4e48ee39017cf86b594429b.tar.xz |
Initial revision
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@169 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/allocator.h')
-rw-r--r-- | loader/dshow/allocator.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/loader/dshow/allocator.h b/loader/dshow/allocator.h new file mode 100644 index 0000000000..0b4917a0a9 --- /dev/null +++ b/loader/dshow/allocator.h @@ -0,0 +1,49 @@ +#ifndef ALLOCATOR_H +#define ALLOCATOR_H + +#include "interfaces.h" +#include "cmediasample.h" +#include <list> +#include "iunk.h" +#include "default.h" +using namespace std; +class MemAllocator: public IMemAllocator +{ + ALLOCATOR_PROPERTIES props; + list<CMediaSample*> used_list; + list<CMediaSample*> free_list; + static GUID interfaces[]; + DECLARE_IUNKNOWN(MemAllocator) +public: + MemAllocator(); + ~MemAllocator(){delete vt;} + static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv); + + 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); +}; + +#endif |