C# Class DirectX.Capture.SourceCollection

A collection of sources (or physical connectors) on an audio or video device. This is used by the Capture class to provide a list of available sources on the currently selected audio and video devices. This class cannot be created directly. This class assumes there is only 1 video and 1 audio crossbar and all input pins route to a single output pin on each crossbar.
Inheritance: System.Collections.CollectionBase, IDisposable
Datei anzeigen Open project: parhansson/KMotionX Class Usage Examples

Private Properties

Property Type Description
SourceCollection System
SourceCollection System

Public Methods

Method Description
Clear ( ) : void

Empty the collection.

Dispose ( ) : void

Release unmanaged resources.

addFromGraph ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter, bool isVideoDevice ) : void

Populate the collection from a filter graph.

this ( int index ) : DirectX.Capture.Source

Get the source at the specified index.

Protected Methods

Method Description
findAudioSources ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter ) : ArrayList
findCrossbarSources ( ICaptureGraphBuilder2 graphBuilder, IAMCrossbar crossbar, bool isVideoDevice ) : ArrayList

Populate the internal InnerList with sources/physical connectors found on the crossbars. Each instance of this class is limited to video only or audio only sources ( specified by the isVideoDevice parameter on the constructor) so we check each source before adding it to the list.

findCrossbars ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter ) : ArrayList

Retrieve a list of crossbar filters in the graph. Most hardware devices should have a maximum of 2 crossbars, one for video and another for audio.

Private Methods

Method Description
SourceCollection ( ) : System

Initialize collection with no sources.

SourceCollection ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter, bool isVideoDevice ) : System

Initialize collection with sources from graph.

Method Details

Clear() public method

Empty the collection.
public Clear ( ) : void
return void

Dispose() public method

Release unmanaged resources.
public Dispose ( ) : void
return void

addFromGraph() public method

Populate the collection from a filter graph.
public addFromGraph ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter, bool isVideoDevice ) : void
graphBuilder ICaptureGraphBuilder2
deviceFilter IBaseFilter
isVideoDevice bool
return void

findAudioSources() protected method

protected findAudioSources ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter ) : ArrayList
graphBuilder ICaptureGraphBuilder2
deviceFilter IBaseFilter
return System.Collections.ArrayList

findCrossbarSources() protected method

Populate the internal InnerList with sources/physical connectors found on the crossbars. Each instance of this class is limited to video only or audio only sources ( specified by the isVideoDevice parameter on the constructor) so we check each source before adding it to the list.
protected findCrossbarSources ( ICaptureGraphBuilder2 graphBuilder, IAMCrossbar crossbar, bool isVideoDevice ) : ArrayList
graphBuilder ICaptureGraphBuilder2
crossbar IAMCrossbar
isVideoDevice bool
return System.Collections.ArrayList

findCrossbars() protected method

Retrieve a list of crossbar filters in the graph. Most hardware devices should have a maximum of 2 crossbars, one for video and another for audio.
protected findCrossbars ( ICaptureGraphBuilder2 graphBuilder, IBaseFilter deviceFilter ) : ArrayList
graphBuilder ICaptureGraphBuilder2
deviceFilter IBaseFilter
return System.Collections.ArrayList

this() public method

Get the source at the specified index.
public this ( int index ) : DirectX.Capture.Source
index int
return DirectX.Capture.Source