Microsoft DirectX 8.0

IAMCrossbar Interface

The IAMCrossbar interface is implemented by the DirectShow® Analog Video Crossbar filter. This filter is a wrapper filter for crossbars on WDM streaming devices, and therefore always assumes the friendly name of the device it is wrapping. For more information on wrapper filters and WDM streaming devices, see How Hardware Devices Participate in the Filter Graph.

The Analog Video Crossbar routes signals from an analog or digital audio or video source to a video capture filter. The filter is modeled after a general switching matrix, with n inputs and m outputs. Any of the input signals can be routed to one or more of the outputs. A single crossbar can route both video and audio signals. You can also use a video pin to route only the audio portion of a combined signal.

Note  A number of methods on this interface take pin indexes as parameters. Pin indexes are computed by using an IEnumPins enumerator. The index values for input pins and output pins both start at zero. You can call the get_PinCounts method to retrieve the number of input and output pins.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMCrossbar methodsDescription
get_PinCounts Retrieves the number of input and output pins.
CanRoute Determines if the crossbar filter can route the analog or digital signal.
Route Routes an input pin to an output pin.
get_IsRoutedTo Retrieves the input pin connected to a given output pin.
get_CrossbarPinInfo Retrieves a pin that has audio or video data relating to a given pin.

IAMCrossbar::CanRoute

IAMCrossbar Interface

Determines if routing is possible.

Syntax

HRESULT CanRoute (
  long OutputPinIndex,
  long InputPinIndex
  );

Parameters

OutputPinIndex
[in] Output pin.
InputPinIndex
[in] Input pin.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

IAMCrossbar::get_CrossbarPinInfo

IAMCrossbar Interface

Retrieves a pin that has audio or video data relating to a given pin.

Syntax

HRESULT get_CrossbarPinInfo (
  BOOL IsInputPin,
  long PinIndex,
  long *PinIndexRelated,
  long *PhysicalType
  );

Parameters

IsInputPin
[in] Specify TRUE for an input pin; FALSE for an output pin.
PinIndex
[in] Pin to find a related pin for.
PinIndexRelated
[out] Pointer to the index value of the related pin.
PhysicalType
[out] Pointer to the physical type of pin (audio or video). Returns a member of the PhysicalConnectorType enumerated data type.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

This method retrieves, for example, the audio pin related to a given video pin.

IAMCrossbar::get_IsRoutedTo

IAMCrossbar Interface

Retrieves the input pin connected to a given output pin.

Syntax

HRESULT get_IsRoutedTo (

  long OutputPinIndex,
  long *InputPinIndex
  );

Parameters

OutputPinIndex
[in] Output pin.
InputPinIndex
[out] Pointer to the connected input pin.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

IAMCrossbar::get_PinCounts

IAMCrossbar Interface

Retrieves the number of input and output pins.

Syntax

HRESULT get_PinCounts(

  long *OutputPinCount,
  long *InputPinCount
  );

Parameters

OutputPinCount
[out] Pointer to the number of output pins.
InputPinCount
[out] Pointer to the number of input pins.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

IAMCrossbar::Route

IAMCrossbar Interface

Routes an input pin to an output pin.

Syntax

HRESULT Route (
  long OutputPinIndex,
  long InputPinIndex
  );

Parameters

OutputPinIndex
[in] Output pin.
InputPinIndex
[in] Input pin.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

Pin indexes are zero based.