Table of Contents

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, IMediaBlockInternals

Inheritance

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

settings IScreenCaptureSourceSettings

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

MediaBlockPad

Inputs

Gets all input pads available on this block (none for source blocks).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary video output pad for the captured screen.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (single video output for screen capture).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the screen capture configuration settings that control capture parameters and display options.

public IScreenCaptureSourceSettings Settings { get; set; }

Property Value

IScreenCaptureSourceSettings

Type

Gets the media block type identifier for screen capture source operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds this instance.

public override bool Build()

Returns

bool

true if successfull, false otherwise.

CleanUp()

Cleans up.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to 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

sourceType ScreenCaptureSourceType

The type of screen capture source to check (D3D11, XDisplay, macOS, etc.).

Returns

bool

true if 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

x int

The x.

y int

The y.

cursor bool

if set to true capture cursor.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The pipeline.

See Also