IPin::QueryInternalConnections

 
Microsoft DirectShow 9.0

IPin::QueryInternalConnections

The QueryInternalConnections method retrieves the pins that are connected internally to this pin (within the filter).

Syntax

  HRESULT QueryInternalConnections(
  IPin **apPin,
  ULONG *nPin
);

Parameters

apPin

[out] Address of an array of IPin pointers. The caller allocates the array. The method fills the array with IPin pointers. If nPin is zero, this parameter can be NULL.

nPin

[in, out] On input, specifies the size of the array. On output, specifies the number of internally connected pins.

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_FALSE Insufficient array size.
S_OK Success.
E_NOTIMPL Not implemented.

Remarks

This method returns information about the filter's internal mapping of input pins to ouput pins. In other words, it describes how the input pins deliver data to the output pins.

In most filters, every input pin connects to every output pin. For example, in a transform filter, one input connects to one output; in a splitter filter, one input connects to multiple ouputs. In these cases, the method should simply return E_NOTIMPL.

Otherwise, the method returns an array of IPin pointers, one for each pin that is mapped internally to the pin you have queried. If you call the method on an input pin, the array contains pointers to output pins, and vice versa.

The caller allocates the array of IPin pointers. To get the required array size, call the method once with apPin equal to NULL. The size is returned in the nPin parameter. Then allocate the array and call the method again, setting apPin equal to the address of the array and nPin equal to the array size. The method then fills the array with IPin pointers. Each returned pointer has an outstanding reference count and must be released by the caller.

This method has another use that is now deprecated: The Filter Graph Manager treats a filter as being a renderer filter if at least one input pin implements this method but returns zero in nPin. If you are writing a new renderer filter, however, you should implement the IAMFilterMiscFlags interface instead of using this method to indicate that the filter is a renderer. 

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also