xine-lib: xine-lib-1.2.13/src/libw32dll/DirectShow/allocator.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Functions | Variables
allocator.c File Reference
`#include "allocator.h"`
`#include "com.h"`
`#include "../wine/winerror.h"`
`#include <stdio.h>`
`#include <stdlib.h>`

## Data Structures
struct | _avm_list_t

## Functions
static int | avm_list_size (avm_list_t *head)
static int | avm_list_print (avm_list_t *head)
static avm_list_t * | avm_list_add_head (avm_list_t *head, void *member)
static avm_list_t * | avm_list_add_tail (avm_list_t *head, void *member)
static avm_list_t * | avm_list_del_head (avm_list_t *head)
static avm_list_t * | avm_list_find (avm_list_t *head, void *member)
static long | MemAllocator_CreateAllocator (GUID *clsid, const GUID *iid, void **ppv)
static HRESULT STDCALL | MemAllocator_SetProperties (IMemAllocator *This, ALLOCATOR_PROPERTIES *pRequest, ALLOCATOR_PROPERTIES *pActual)
static HRESULT STDCALL | MemAllocator_GetProperties (IMemAllocator *This, ALLOCATOR_PROPERTIES *pProps)
static HRESULT STDCALL | MemAllocator_Commit (IMemAllocator *This)
static HRESULT STDCALL | MemAllocator_Decommit (IMemAllocator *This)
static HRESULT STDCALL | MemAllocator_GetBuffer (IMemAllocator *This, IMediaSample **ppBuffer, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime, DWORD dwFlags)
static HRESULT STDCALL | MemAllocator_ReleaseBuffer (IMemAllocator *This, IMediaSample *pBuffer)
static void | MemAllocator_SetPointer (MemAllocator *This, char *pointer)
static void | MemAllocator_ResetPointer (MemAllocator *This)
static void | MemAllocator_Destroy (MemAllocator *This)
static long STDCALL | MemAllocator_QueryInterface (IUnknown *This, const GUID *riid, void **ppvObject)
static long STDCALL | MemAllocator_AddRef (IUnknown *This)
static long STDCALL | MemAllocator_Release (IUnknown *This)
MemAllocator * | MemAllocatorCreate ()

## Variables
static int | AllocatorKeeper = 0

## Function Documentation

## ◆ avm_list_add_head()

static avm_list_t * avm_list_add_head | ( | avm_list_t * | head,
|  | void * | member )
| inlinestatic

References _avm_list_t::member, _avm_list_t::next, and _avm_list_t::prev.

Referenced by avm_list_add_tail(), and MemAllocator_ReleaseBuffer().

## ◆ avm_list_add_tail()

static avm_list_t * avm_list_add_tail | ( | avm_list_t * | head,
|  | void * | member )
| inlinestatic

References avm_list_add_head(), and _avm_list_t::member.

Referenced by MemAllocator_Commit(), MemAllocator_Decommit(), and MemAllocator_GetBuffer().

## ◆ avm_list_del_head()

static avm_list_t * avm_list_del_head | ( | avm_list_t * | head | ) |
| inlinestatic

References _avm_list_t::next, and _avm_list_t::prev.

Referenced by MemAllocator_Decommit(), MemAllocator_GetBuffer(), and MemAllocator_ReleaseBuffer().

## ◆ avm_list_find()

static avm_list_t * avm_list_find | ( | avm_list_t * | head,
|  | void * | member )
| inlinestatic

References _avm_list_t::member, _avm_list_t::next, and NULL.

Referenced by MemAllocator_ReleaseBuffer().

## ◆ avm_list_print()

static int avm_list_print | ( | avm_list_t * | head | ) |
| inlinestatic

References _avm_list_t::member, _avm_list_t::next, and _avm_list_t::prev.

## ◆ avm_list_size()

static int avm_list_size | ( | avm_list_t * | head | ) |
| inlinestatic

References _avm_list_t::next.

Referenced by MemAllocator_GetBuffer(), and MemAllocator_ReleaseBuffer().

## ◆ MemAllocator_AddRef()

static long STDCALL MemAllocator_AddRef | ( | IUnknown * | This | ) |
| static

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_Commit()

static HRESULT STDCALL MemAllocator_Commit | ( | IMemAllocator * | This | ) |
| static

References avm_list_add_tail(), _AllocatorProperties::cBuffers, CMediaSampleCreate(), Debug, _MemAllocator::free_list, _MemAllocator::props, and _MemAllocator::used_list.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_CreateAllocator()

static long MemAllocator_CreateAllocator | ( | GUID * | clsid,
|  | const GUID * | iid,
|  | void ** | ppv )
| static

References CLSID_MemoryAllocator, MemAllocatorCreate(), IMemAllocator_vt::QueryInterface, IMemAllocator_vt::Release, and _IMemAllocator::vt.

Referenced by MemAllocator_Destroy(), and MemAllocatorCreate().

## ◆ MemAllocator_Decommit()

static HRESULT STDCALL MemAllocator_Decommit | ( | IMemAllocator * | This | ) |
| static

References avm_list_add_tail(), avm_list_del_head(), CMediaSample_Destroy(), Debug, _MemAllocator::free_list, _avm_list_t::member, and _MemAllocator::used_list.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_Destroy()

static void MemAllocator_Destroy | ( | MemAllocator * | This | ) |
| static

References AllocatorKeeper, CLSID_MemoryAllocator, Debug, MemAllocator_CreateAllocator(), _MemAllocator::refcount, and _MemAllocator::vt.

## ◆ MemAllocator_GetBuffer()

static HRESULT STDCALL MemAllocator_GetBuffer | ( | IMemAllocator * | This,
|  | IMediaSample ** | ppBuffer,
|  | REFERENCE_TIME * | pStartTime,
|  | REFERENCE_TIME * | pEndTime,
|  | DWORD | dwFlags )
| static

References IMediaSample_vt::AddRef, avm_list_add_tail(), avm_list_del_head(), avm_list_size(), Debug, _MemAllocator::free_list, _avm_list_t::member, _MemAllocator::modified_sample, _MemAllocator::new_pointer, _CMediaSample::ResetPointer, _CMediaSample::SetPointer, _MemAllocator::used_list, and _CMediaSample::vt.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_GetProperties()

static HRESULT STDCALL MemAllocator_GetProperties | ( | IMemAllocator * | This,
|  | ALLOCATOR_PROPERTIES * | pProps )
| static

References Debug.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_QueryInterface()

static long STDCALL MemAllocator_QueryInterface | ( | IUnknown * | This,
|  | const GUID * | riid,
|  | void ** | ppvObject )
| static

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_Release()

static long STDCALL MemAllocator_Release | ( | IUnknown * | This | ) |
| static

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_ReleaseBuffer()

static HRESULT STDCALL MemAllocator_ReleaseBuffer | ( | IMemAllocator * | This,
|  | IMediaSample * | pBuffer )
| static

References avm_list_add_head(), avm_list_del_head(), avm_list_find(), avm_list_size(), Debug, _MemAllocator::free_list, _avm_list_t::member, _MemAllocator::modified_sample, _CMediaSample::ResetPointer, and _MemAllocator::used_list.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_ResetPointer()

static void MemAllocator_ResetPointer | ( | MemAllocator * | This | ) |
| static

References _MemAllocator::modified_sample, and _CMediaSample::ResetPointer.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_SetPointer()

static void MemAllocator_SetPointer | ( | MemAllocator * | This,
|  | char * | pointer )
| static

References _MemAllocator::new_pointer.

Referenced by MemAllocatorCreate().

## ◆ MemAllocator_SetProperties()

static HRESULT STDCALL MemAllocator_SetProperties | ( | IMemAllocator * | This,
|  | ALLOCATOR_PROPERTIES * | pRequest,
|  | ALLOCATOR_PROPERTIES * | pActual )
| static

References _AllocatorProperties::cbBuffer, _AllocatorProperties::cBuffers, Debug, _MemAllocator::free_list, _MemAllocator::props, and _MemAllocator::used_list.

Referenced by MemAllocatorCreate().

## ◆ MemAllocatorCreate()

MemAllocator * MemAllocatorCreate | ( | void |  | ) |

References IMemAllocator_vt::AddRef, AllocatorKeeper, _AllocatorProperties::cbAlign, _AllocatorProperties::cbBuffer, _AllocatorProperties::cbPrefix, _AllocatorProperties::cBuffers, CLSID_MemoryAllocator, IMemAllocator_vt::Commit, Debug, IMemAllocator_vt::Decommit, _MemAllocator::free_list, IMemAllocator_vt::GetBuffer, IMemAllocator_vt::GetProperties, IID_IMemAllocator, _MemAllocator::interfaces, MemAllocator_AddRef(), MemAllocator_Commit(), MemAllocator_CreateAllocator(), MemAllocator_Decommit(), MemAllocator_GetBuffer(), MemAllocator_GetProperties(), MemAllocator_QueryInterface(), MemAllocator_Release(), MemAllocator_ReleaseBuffer(), MemAllocator_ResetPointer(), MemAllocator_SetPointer(), MemAllocator_SetProperties(), _MemAllocator::modified_sample, _MemAllocator::new_pointer, NULL, _MemAllocator::props, IMemAllocator_vt::QueryInterface, _MemAllocator::refcount, IMemAllocator_vt::Release, IMemAllocator_vt::ReleaseBuffer, _MemAllocator::ResetPointer, _MemAllocator::SetPointer, IMemAllocator_vt::SetProperties, _MemAllocator::used_list, and _MemAllocator::vt.

Referenced by COutputPin_GetAllocator(), and MemAllocator_CreateAllocator().

## Variable Documentation

## ◆ AllocatorKeeper

int AllocatorKeeper = 0
| static

Referenced by MemAllocator_Destroy(), and MemAllocatorCreate().