CTransInPlaceFilter.GetPin method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
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
Requirement | Value |
---|---|
Header |
|
Library |
|