Class AudioDelayBlock
- Assembly
- VisioForge.Core.dll
Audio delay block that shifts audio buffer timestamps to delay the stream.
public class AudioDelayBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
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
delayTimeSpan-
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
settingsAudioDelaySettings-
The audio delay settings.
Properties
Delay
Gets or sets the audio delay.
public TimeSpan Delay { get; set; }Property Value
Input
Gets the audio input pad.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets the input pads.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the audio output pad.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets the output pads.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the delay settings.
public AudioDelaySettings Settings { get; set; }Property Value
TimestampOffsetNanoseconds
Gets the delay represented as a GStreamer timestamp offset in nanoseconds.
public long TimestampOffsetNanoseconds { get; }Property Value
Type
Gets the media block type identifier.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the audio delay element.
public override bool Build()Returns
- bool
-
trueif 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
disposingbool-
trueto 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
-
trueif 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
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance that owns this block.