Table of Contents

Class AppBridgeAudioSourceBlock

Namespace
VisioForge.Core.MediaBlocks.Bridge
Assembly
VisioForge.Core.dll

Audio source block using appsrc for direct buffer injection from AppBridgeAudioSinkBlock. This block receives audio buffers with preserved timestamps from a linked AppBridgeAudioSinkBlock, solving timing issues with Decklink and other hardware outputs. Unlike interaudiosrc-based bridges, this implementation preserves original PTS/DTS timestamps, enabling proper synchronization with hardware clocks. Use this with AppBridgeAudioSinkBlock for live sources that require precise timestamp handling.

public class AppBridgeAudioSourceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlocksBridge

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

AppBridgeAudioSourceBlock(AppBridgeAudioSourceSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Bridge.AppBridgeAudioSourceBlock class.

public AppBridgeAudioSourceBlock(AppBridgeAudioSourceSettings settings)

Parameters

settings AppBridgeAudioSourceSettings

The bridge settings including channel name.

Properties

Input

Gets the input pad. Sources do not have inputs.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads. Sources have no inputs.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the single audio output pad for this source block.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads. This source has a single audio output.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the bridge settings.

public AppBridgeAudioSourceSettings Settings { get; set; }

Property Value

AppBridgeAudioSourceSettings

Type

Gets the block type identifier.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the bridge audio source within the pipeline.

public override bool Build()

Returns

bool

true if successful; otherwise, false.

CleanUp()

Releases all internal resources.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources.

GetCore()

Gets the core BaseElement wrapper.

public BaseElement GetCore()

Returns

BaseElement

The AppBridgeAudioSource element.

GetElement()

Gets the underlying GStreamer element.

public Element GetElement()

Returns

Element

The GStreamer element.

IsAvailable()

Determines whether this media block is available.

public static bool IsAvailable()

Returns

bool

true if available; otherwise, false.

RemoveElementsFromPipeline()

Removes all internal elements from the pipeline.

public override void RemoveElementsFromPipeline()

UpdateChannel(string)

Updates the channel name dynamically.

public bool UpdateChannel(string channel)

Parameters

channel string

The new channel name.

Returns

bool

true if successful; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The pipeline.