CTransInPlaceFilter::GetPin

 
Microsoft DirectShow 9.0

CTransInPlaceFilter::GetPin

The GetPin method retrieves a pin.

Syntax

  virtual CBasePin *GetPin(
    int n
);

Parameters

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.

Remarks

This method overrides the CTransformFilter::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 CTransInPlaceInputPin and CTransInPlaceOutputPin 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.

Requirements

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

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

See Also