// AForge Direct Show Library // AForge.NET framework // http://www.aforgenet.com/framework/ // // Copyright © AForge.NET, 2009-2012 // contacts@aforgenet.com // using System; using System.Runtime.InteropServices; namespace AForge.Video.DirectShow.Internals { /// /// The IAMCrossbar interface routes signals from an analog or digital source to a video capture filter. /// [ComImport, System.Security.SuppressUnmanagedCodeSecurity, Guid( "C6E13380-30AC-11D0-A18C-00A0C9118956" ), InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] internal interface IAMCrossbar { /// /// Retrieves the number of input and output pins on the crossbar filter. /// /// /// Variable that receives the number of output pins. /// Variable that receives the number of input pins. /// /// Return's HRESULT error code. /// [PreserveSig] int get_PinCounts( [Out] out int outputPinCount, [Out] out int inputPinCount ); /// /// Queries whether a specified input pin can be routed to a specified output pin. /// /// /// Specifies the index of the output pin. /// Specifies the index of input pin. /// /// Return's HRESULT error code. /// [PreserveSig] int CanRoute( [In] int outputPinIndex, [In] int inputPinIndex ); /// /// Routes an input pin to an output pin. /// /// /// Specifies the index of the output pin. /// Specifies the index of the input pin. /// /// Return's HRESULT error code. /// [PreserveSig] int Route( [In] int outputPinIndex, [In] int inputPinIndex ); /// /// Retrieves the input pin that is currently routed to the specified output pin. /// /// /// Specifies the index of the output pin. /// Variable that receives the index of the input pin, or -1 if no input pin is routed to this output pin. /// /// Return's HRESULT error code. /// [PreserveSig] int get_IsRoutedTo( [In] int outputPinIndex, [Out] out int inputPinIndex ); /// /// Retrieves information about a specified pin. /// /// /// Specifies the direction of the pin. Use one of the following values. /// Specifies the index of the pin. /// Variable that receives the index of the related pin, or –1 if no pin is related to this pin. /// Variable that receives a member of the PhysicalConnectorType enumeration, indicating the pin's physical type. /// /// Return's HRESULT error code. /// [PreserveSig] int get_CrossbarPinInfo( [In, MarshalAs( UnmanagedType.Bool )] bool isInputPin, [In] int pinIndex, [Out] out int pinIndexRelated, [Out] out PhysicalConnectorType physicalType ); } }