Class CustomSourceSettings
- Namespace
- VisioForge.Core.Types.VideoCapture
- Assembly
- VisioForge.Core.dll
Provides configuration settings for custom DirectShow video and audio source filters.
public class CustomSourceSettingsInheritance
Inherited Members
Remarks
The VisioForge.Core.Types.VideoCapture.CustomSourceSettings class allows integration of custom DirectShow filters as video or audio sources. This enables support for proprietary hardware devices, specialized codecs, or custom media sources that aren't natively supported by the framework. You can specify filters by name, CLSID, or category, and configure their media types and formats.
Constructors
CustomSourceSettings()
Initializes a new instance of the VisioForge.Core.Types.VideoCapture.CustomSourceSettings class.
public CustomSourceSettings()Remarks
The constructor sets default values:
- VideoFilterCategory is set to VideoCaptureSource
- AudioFilterCategory is set to AudioCaptureSource
- Both CLSIDs are initialized to Guid.Empty
Properties
AudioFilenameOrURL
Gets or sets the file name or URL for audio filters that support the IFileSourceFilter interface.
public string AudioFilenameOrURL { get; set; }Property Value
AudioFilterAMMediaType
Gets or sets the custom AM_MEDIA_TYPE structure for the audio source.
public object AudioFilterAMMediaType { get; set; }Property Value
Remarks
Use this for advanced scenarios requiring precise audio format specifications that cannot be expressed through the format string alone.
AudioFilterCLSID
Gets or sets the CLSID (Class Identifier) of the audio filter.
public Guid AudioFilterCLSID { get; set; }Property Value
AudioFilterCategory
Gets or sets the category of the custom audio source filter.
public FilterCategoryX AudioFilterCategory { get; set; }Property Value
Remarks
Audio filter categories include AudioCaptureSource, AudioCompressor, and LegacyAmFilterCategory.
AudioFilterFormat
Gets or sets the audio format string for the custom source filter.
public string AudioFilterFormat { get; set; }Property Value
AudioFilterName
Gets or sets the name of the custom audio source filter.
public string AudioFilterName { get; set; }Property Value
AudioFilterPCMConverterAMMediaType
Gets or sets the AM_MEDIA_TYPE for an optional PCM converter connected to the audio source.
public object AudioFilterPCMConverterAMMediaType { get; set; }Property Value
Remarks
Some audio sources output compressed or non-standard formats. A PCM converter can be automatically inserted to convert the audio to standard uncompressed PCM format for further processing.
SourceInterface
Gets or sets a custom video source interface implementation.
public ICustomVideoSource SourceInterface { get; set; }Property Value
Remarks
This property allows you to bypass DirectShow entirely and provide your own video source implementation. This is useful for integrating custom hardware or software sources that don't have DirectShow filters.
VideoFilenameOrURL
Gets or sets the file name or URL for filters that support the IFileSourceFilter interface.
public string VideoFilenameOrURL { get; set; }Property Value
Remarks
Only filters that implement the IFileSourceFilter interface will use this property. For example, this could be used with custom file reader filters or network stream filters.
VideoFilterAMMediaType
Gets or sets the custom AM_MEDIA_TYPE structure for the video source.
public object VideoFilterAMMediaType { get; set; }Property Value
Remarks
This property is for advanced scenarios where you need to specify an exact media type that cannot be expressed through the format string alone. The object should be a properly formatted AM_MEDIA_TYPE structure.
VideoFilterCLSID
Gets or sets the CLSID (Class Identifier) of the video filter.
public Guid VideoFilterCLSID { get; set; }Property Value
Examples
settings.VideoFilterCLSID = new Guid("12345678-1234-1234-1234-123456789012");
VideoFilterCategory
Gets or sets the category of the custom video source filter.
public FilterCategoryX VideoFilterCategory { get; set; }Property Value
Remarks
Filter categories help organize and discover filters by their function. Common categories include VideoCaptureSource, VideoCompressor, and LegacyAmFilterCategory.
VideoFilterFormat
Gets or sets the video format string for the custom source filter.
public string VideoFilterFormat { get; set; }Property Value
Remarks
Common format strings include resolution and pixel format information, such as "1920x1080" or "YUY2". Consult your filter's documentation for supported format strings.
VideoFilterFrameRate
Gets or sets the frame rate for the custom video source filter.
public VideoFrameRate VideoFilterFrameRate { get; set; }Property Value
VideoFilterName
Gets or sets the name of the custom video source filter.
public string VideoFilterName { get; set; }Property Value
Examples
settings.VideoFilterName = "My Custom Video Source";