Share via


CImageAllocator::NotifyMediaType

 
Microsoft DirectShow 9.0

CImageAllocator::NotifyMediaType

The NotifyMediaType method informs the object of the current media type.

Syntax

  void NotifyMediaType(
  CMediaType *pMediaType
);

Parameters

pMediaType

Pointer to a CMediaType object, or NULL to clear the media type.

Return Value

No return value.

Remarks

The owning filter should call this method whenever the media type changes. Typically this occurs when the pin first connects, and after a dynamic format change. The allocator uses the media type to validate proposed allocator properties, and also when it creates media samples.

The CImageAllocator object stores the pMediaType pointer in the m_pMediaType member variable. Therefore, if the caller needs to release the CMediaType object, it should update the allocator by calling this method again, either with a new pointer or with a NULL value. Otherwise, an error can occur when the allocator attempts to reference the old pointer.

Requirements

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

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

See Also