summaryrefslogtreecommitdiff
path: root/src/libw32dll/DirectShow/allocator.h
blob: 1d37dd920a5a3b9af1bbadbb123e0e6df720f6ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef DS_ALLOCATOR_H
#define DS_ALLOCATOR_H

/*
#ifndef NOAVIFILE_HEADERS
#include "default.h" 
#else
#include "../wine/libwin32.h"
#endif
*/

#include "interfaces.h"
#include "cmediasample.h"
#include "iunk.h"

typedef struct _CMediaSample_vector
{   
    CMediaSample** m_Type;
    int m_uiSize;
    int m_uiAlloc;
} CMediaSample_vector;

typedef struct _MemAllocator
{
    IMemAllocator_vt *vt;
    
    ALLOCATOR_PROPERTIES props;

    CMediaSample_vector * used_list;
    CMediaSample_vector * free_list;
  
    char* new_pointer;
    CMediaSample* modified_sample;
    GUID interfaces[2];
    DECLARE_IUNKNOWN(MemAllocator);
    
    /*
    MemAllocator();
    ~MemAllocator();
    static long CreateAllocator(GUID* clsid, GUID* iid, void** ppv);
    */
} MemAllocator;

MemAllocator * MemAllocator_Create();
void MemAllocator_Destroy(MemAllocator *this);

long MemAllocator_CreateAllocator(GUID* clsid, GUID* iid, void** ppv);
void MemAllocator_SetPointer(MemAllocator*this, char* pointer);
void MemAllocator_ResetPointer(MemAllocator*this);

#endif /* DS_ALLOCATOR_H */