Class AppBridgeAudioSinkBlock
- Namespace
- VisioForge.Core.MediaBlocks.Bridge
- Assembly
- VisioForge.Core.dll
Audio sink block using appsink for direct buffer transfer between pipelines. This block captures audio buffers and passes them directly to a linked AppBridgeAudioSourceBlock with preserved timestamps, solving timing issues with Decklink and other hardware outputs. Unlike interaudiosink-based bridges, this implementation gives full control over buffer timing and avoids clock synchronization issues. Use this with AppBridgeAudioSourceBlock for live sources that require precise timestamp handling.
public class AppBridgeAudioSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlocksBridgeInheritance
Implements
Inherited Members
Extension Methods
Constructors
AppBridgeAudioSinkBlock(AppBridgeAudioSinkSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Bridge.AppBridgeAudioSinkBlock class.
public AppBridgeAudioSinkBlock(AppBridgeAudioSinkSettings settings)Parameters
settingsAppBridgeAudioSinkSettings-
The bridge settings including channel name.
Properties
Input
Gets the single audio input pad for this sink block.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads. This sink has a single audio input.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output pad. Sinks do not have outputs.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads. Sinks have no outputs.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the bridge settings.
public AppBridgeAudioSinkSettings Settings { get; set; }Property Value
Type
Gets the block type identifier.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the bridge audio sink within the pipeline.
public override bool Build()Returns
- bool
-
trueif 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
disposingbool-
trueto release both managed and unmanaged resources.
GetCore()
Gets the core BaseElement wrapper.
public BaseElement GetCore()Returns
- BaseElement
-
The AppBridgeAudioSink 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
-
trueif available; otherwise,false.
UpdateChannel(string)
Updates the channel name dynamically.
public bool UpdateChannel(string channel)Parameters
channelstring-
The new channel name.
Returns
- bool
-
trueif successful; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The pipeline.