Table of Contents

Class AudioDelayBlock

Namespace
VisioForge.Core.MediaBlocks.AudioProcessing
Assembly
VisioForge.Core.dll

Audio delay block that shifts audio buffer timestamps to delay the stream.

public class AudioDelayBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

This block is intended for audio/video synchronization and branch-specific capture/preview delay. It does not create an audible echo; it delays the whole audio stream by applying a timestamp offset.

Constructors

AudioDelayBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.AudioProcessing.AudioDelayBlock class.

public AudioDelayBlock()

AudioDelayBlock(TimeSpan)

Initializes a new instance of the VisioForge.Core.MediaBlocks.AudioProcessing.AudioDelayBlock class.

public AudioDelayBlock(TimeSpan delay)

Parameters

delay TimeSpan

The non-negative delay to apply to the audio stream.

AudioDelayBlock(AudioDelaySettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.AudioProcessing.AudioDelayBlock class.

public AudioDelayBlock(AudioDelaySettings settings)

Parameters

settings AudioDelaySettings

The audio delay settings.

Properties

Delay

Gets or sets the audio delay.

public TimeSpan Delay { get; set; }

Property Value

TimeSpan

Input

Gets the audio input pad.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the input pads.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the audio output pad.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the output pads.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the delay settings.

public AudioDelaySettings Settings { get; set; }

Property Value

AudioDelaySettings

TimestampOffsetNanoseconds

Gets the delay represented as a GStreamer timestamp offset in nanoseconds.

public long TimestampOffsetNanoseconds { get; }

Property Value

long

Type

Gets the media block type identifier.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the audio delay element.

public override bool Build()

Returns

bool

true if the block was built; otherwise, false.

CleanUp()

Releases the internal GStreamer element.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release managed resources; otherwise, false.

GetCore()

Gets the core BaseElement wrapper.

public BaseElement GetCore()

Returns

BaseElement

Always returns null because this block uses a direct GStreamer element.

GetElement()

Gets the underlying GStreamer identity 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 the underlying GStreamer identity element is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this audio delay block with a pipeline and initializes its internal context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance that owns this block.