次の方法で共有


CBaseInputPin::GetAllocator

 
Microsoft DirectShow 9.0

CBaseInputPin::GetAllocator

The GetAllocator method retrieves the memory allocator proposed by this pin. This method implements the IMemInputPin::GetAllocator method.

Syntax

  HRESULT GetAllocator(
    IMemAllocator **ppAllocator
);

Parameters

ppAllocator

Address of a variable that receives a pointer to the allocator's IMemAllocator interface.

Return Value

Returns S_OK if successful, or an error code from the CoCreateInstance function.

Remarks

This method creates a CMemAllocator object. Override this method if your filter uses an allocator from a downstream pin, or a custom allocator.

If the method succeeds, the IMemAllocator interface has an outstanding reference count. Be sure to release it when you are done.

Requirements

**  Header:** Declared in Amfilter.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also