CTransformFilter.GetPin method

The GetPin method retrieves a pin.


virtual CBasePin* GetPin(
   int n



Number of the specified pin, indexed from zero. On this filter, pin 0 is the input pin, and pin 1 is the output pin.

Return value

Returns a pointer to the CBasePin object that implements the pin, or NULL if the method fails.


This method implements the pure virtual CBaseFilter::GetPin method. The first time the method is called, it creates both pins.

This method does not increment the reference count on the returned pin, so the returned pin does not have an outstanding reference count. If the caller needs to keep a reference on the pin, it should call the IUnknown::AddRef method on the pin.

If the filter uses the default CTransformInputPin and CTransformOutputPin pins, you probably do not need to override this method. If the filter uses pins that extend those classes, however, you must override this method to create pins of that type.


Transfrm.h (include Streams.h)
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CTransformFilter Class