1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-13 10:26:00 +00:00
mpv/loader/dshow/allocator.h
arpi bda27f2adc big avifile sync - from now we have common code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1546 b3059339-0415-0410-9bf9-f77b7e298cf2
2001-08-16 00:50:02 +00:00

36 lines
745 B
C++

#ifndef DS_ALLOCATOR_H
#define DS_ALLOCATOR_H
#include "interfaces.h"
#include "cmediasample.h"
#include "iunk.h"
#include <list>
struct MemAllocator: public IMemAllocator
{
ALLOCATOR_PROPERTIES props;
std::list<CMediaSample*> used_list;
std::list<CMediaSample*> free_list;
char* new_pointer;
CMediaSample* modified_sample;
static GUID interfaces[];
DECLARE_IUNKNOWN(MemAllocator)
MemAllocator();
~MemAllocator();
void SetPointer(char* pointer) { new_pointer=pointer; }
void ResetPointer()
{
if (modified_sample)
{
modified_sample->ResetPointer();
modified_sample=0;
}
}
static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv);
};
#endif /* DS_ALLOCATOR_H */