Class ScreenSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
Screen capture source block for desktop recording and screen sharing applications across multiple platforms. Provides real-time screen capture with hardware acceleration support using platform-specific APIs (D3D11, XDisplay, macOS, iOS) for live streaming, tutorials, remote assistance, and screen recording with high performance and low system impact. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class ScreenSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
ScreenSourceBlock(IScreenCaptureSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.ScreenSourceBlock class with custom capture settings. Configures the screen capture source with specified display, resolution, and capture parameters.
public ScreenSourceBlock(IScreenCaptureSourceSettings settings)Parameters
settingsIScreenCaptureSourceSettings-
The screen capture settings controlling display selection, resolution, frame rate, and capture area parameters.
ScreenSourceBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.ScreenSourceBlock class with platform-specific default settings. Automatically selects the appropriate screen capture method based on the current platform (D3D11, XDisplay, macOS, iOS).
public ScreenSourceBlock()Properties
Input
Gets the primary input pad (none for source blocks that capture screens).
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 captured screen.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single video output for screen capture).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the screen capture configuration settings that control capture parameters and display options.
public IScreenCaptureSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for screen capture source operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds this instance.
public override bool Build()Returns
- bool
-
trueif successfull,falseotherwise.
CleanUp()
Cleans up.
public void CleanUp()Dispose(bool)
Releases unmanaged and - optionally - managed 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 screen capture source GStreamer element.
IsAvailable(ScreenCaptureSourceType)
Determines whether screen capture support is available for the specified source type on the current system. Requires platform-specific screen capture APIs and drivers to be available and functional.
public static bool IsAvailable(ScreenCaptureSourceType sourceType)Parameters
sourceTypeScreenCaptureSourceType-
The type of screen capture source to check (D3D11, XDisplay, macOS, etc.).
Returns
- bool
-
trueif screen capture support is available for the specified type; otherwise,false.
UpdateLiveSettings(int, int, bool)
Updates the live settings.
public void UpdateLiveSettings(int x, int y, bool cursor)Parameters
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The pipeline.