Class BaslerSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
Basler industrial camera source block for professional video capture with Pylon SDK integration. Provides high-performance video acquisition from Basler cameras with advanced imaging features for machine vision, industrial automation, medical imaging, and scientific applications using GigE Vision, USB3 Vision, and Camera Link standards. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class BaslerSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
BaslerSourceBlock(BaslerSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.BaslerSourceBlock class with custom camera settings. Configures the Basler camera source for professional video capture with specified imaging parameters.
public BaslerSourceBlock(BaslerSourceSettings settings)Parameters
settingsBaslerSourceSettings-
The Basler camera settings controlling device selection, resolution, frame rate, and capture parameters.
Properties
Input
Gets the primary input pad (none for source blocks that generate media).
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 Basler 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 Basler camera configuration settings that control camera parameters and capture options.
public BaslerSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for Basler camera source operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the Basler camera source within the pipeline context. Opens camera connection, configures capture parameters, and establishes video output for downstream processing.
public override bool Build()Returns
- bool
-
trueif the Basler camera source was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the Basler camera operations, including camera connection and video buffers.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the Basler camera source. Properly closes camera connection and disposes of GStreamer elements and camera 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 Basler camera source GStreamer element.
IsAvailable()
Determines whether Basler camera support is available on the current system. Requires Basler Pylon SDK and compatible camera drivers to be installed and functional.
public static bool IsAvailable()Returns
- bool
-
trueif Basler camera support is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this Basler camera source, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this Basler camera source.