Class GenICamSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
GenICam (Generic Interface for Cameras) source block for industrial and scientific camera control. Provides standardized access to machine vision cameras from multiple manufacturers using the GenICam standard for industrial automation, quality inspection, scientific imaging, and computer vision applications with advanced camera features. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GenICamSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GenICamSourceBlock(GenICamSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.GenICamSourceBlock class with custom camera settings. Configures the GenICam source for industrial camera acquisition with specified parameters.
public GenICamSourceBlock(GenICamSourceSettings settings)Parameters
settingsGenICamSourceSettings-
The GenICam settings controlling camera selection, image format, and acquisition parameters.
Properties
Input
Gets the primary input pad (none for source blocks that capture from cameras).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for source blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary video output pad for the camera stream.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single video output for camera).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the GenICam configuration settings that control camera parameters and acquisition mode.
public GenICamSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for GenICam source operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the GenICam source within the pipeline context. Connects to industrial camera, configures acquisition parameters, and prepares video output for downstream processing.
public override bool Build()Returns
- bool
-
trueif the GenICam source was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the GenICam operations, including camera handles and image buffers.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the GenICam source. Properly closes camera connection and disposes of GStreamer elements and acquisition resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
Always null for composite source blocks with multiple internal elements.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The GenICam source GStreamer element.
IsAvailable()
Determines whether GenICam support is available on the current system. Requires GenICam-compatible camera drivers and GStreamer GenICam plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif GenICam support is available; otherwise,false.
Stop()
Stops the GenICam camera acquisition and releases camera resources.
public override bool Stop()Returns
- bool
-
trueif the camera was successfully stopped; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this GenICam source, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this GenICam source.