CTransInPlaceInputPin::NotifyAllocator

 
Microsoft DirectShow 9.0

CTransInPlaceInputPin::NotifyAllocator

The NotifyAllocator method specifies an allocator for the connection. This method implements the IMemInputPin::NotifyAllocator method.

Syntax

  HRESULT NotifyAllocator(
    IMemAllocator *pAllocator,
    BOOL bReadOnly
);

Parameters

pAllocator

Pointer to the allocator's IMemAllocator interface.

bReadOnly

Flag that specifies whether samples from this allocator are read-only. If TRUE, samples are read-only.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

Value Description
S_OK Success
E_FAIL Failure
E_POINTER NULL pointer argument

Remarks

The filter attempts to use the same allocator for both pin connections.

  • If the output pin is not connected, the input pin automatically accepts the allocator. When the output pin is connected, the filter will reconnect the input pin. At that point, the filter will try again to use a single allocator.
  • If the output pin is connected, the input pin accepts the allocator. The output pin also uses the same allocator. It calls NotifyAllocator on the downstream input pin.

The previous case has the following exception:

  • If the proposed allocator is read-only (that is, the bReadOnly parameter is TRUE) and the filter needs to modify the samples, then the filter must use two different allocators. In this case, if the upstream filter is proposing to use the downstream filter's allocator, the method returns E_FAIL.

Requirements

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

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

See Also