DirectShow Animated Header -- IAMCrossbar Interface DirectShow Animated Header -- IAMCrossbar Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IAMCopyCaptureFileProgress Interface
*Next Topic: IAMCutListElement Interface

IAMCrossbar Interface


The IAMCrossbar interface is exposed on analog video crossbar filters and is used to route messages from an analog or digital audio or video source to a video capture filter. The crossbar 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.

This filter is based on a simple multiplexer.

When to Implement

Implement this interface when your filter needs to route analog or digital signals to a capture filter.

When to Use

Use this interface when your application needs to route analog or digital video signals through a crossbar filter.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMCrossbar methods Description
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.

HRESULT CanRoute (
  long OutputPinIndex,
  long InputPinIndex
  );

Parameters
OutputPinIndex
[in] Output pin.
InputPinIndex
[in] Input pin.
Return Values

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.

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] Index value of the related pin.
PhysicalType
[out] Physical type of pin (audio or video).
Return Values

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.

HRESULT get_IsRoutedTo (
  long OutputPinIndex,
  long * InputPinIndex
  );

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

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.

HRESULT get_PinCounts(
  long * OutputPinCount,
  long * InputPinCount
  );

Parameters
OutputPinCount
[out] Number of output pins.
InputPinCount
[out] Number of input pins.
Return Values

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


IAMCrossbar::Route

IAMCrossbar Interface

Routes an input pin to an output pin.

HRESULT Route (
  long OutputPinIndex,
  long InputPinIndex
  );

Parameters
OutputPinIndex
[in] Output pin.
InputPinIndex
[in] Input pin.
Return Values

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

Remarks

Pin indexes are zero based.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page