Class SRTSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
SRT (Secure Reliable Transport) source block with integrated decoding capabilities for complete media playback. Provides secure, low-latency streaming reception with automatic video, audio, and subtitle decoding for live broadcasting, remote production, and professional streaming applications requiring high-quality, reliable transmission over unreliable networks. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class SRTSourceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
SRTSourceBlock(SRTSourceSettings, bool, bool, bool)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.SRTSourceBlock class with custom SRT settings and stream selection. Configures the SRT source with integrated decoding for secure low-latency streaming with specified output streams.
public SRTSourceBlock(SRTSourceSettings settings, bool renderVideo = true, bool renderAudio = true, bool renderSubtitle = false)Parameters
settingsSRTSourceSettings-
The SRT settings controlling URI, encryption, latency, bandwidth, and network configuration parameters.
renderVideobool-
If set to
true, enables video stream decoding and output. renderAudiobool-
If set to
true, enables audio stream decoding and output. renderSubtitlebool-
If set to
true, enables subtitle stream decoding and output.
Properties
AudioOutput
Gets the audio output pad that provides decoded SRT audio stream to downstream blocks.
public MediaBlockPad AudioOutput { get; }Property Value
DisableAudioConverter
Gets or sets a value indicating whether to disable audio converter for direct audio output.
public bool DisableAudioConverter { get; set; }Property Value
Input
Gets the primary input pad (none for source blocks that receive network streams).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for source blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad (video output for SRT stream).
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (dynamic based on enabled streams).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the SRT configuration settings that control network parameters and decoding options.
public SRTSourceSettings Settings { get; set; }Property Value
SubtitleOutput
Gets the subtitle output pad that provides decoded SRT subtitle stream to downstream blocks.
public MediaBlockPad SubtitleOutput { get; }Property Value
Type
Gets the media block type identifier for SRT source operations with decoding.
public override MediaBlockType Type { get; }Property Value
VideoOutput
Gets the video output pad that provides decoded SRT video stream to downstream blocks.
public MediaBlockPad VideoOutput { get; }Property Value
Methods
Build()
Builds and initializes the SRT source with decoding within the pipeline context. Establishes secure SRT connection, configures automatic decoding, and prepares decoded outputs for downstream processing.
public override bool Build()Returns
- bool
-
trueif the SRT source with decoding was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the SRT operations, including secure connection, decoders, and media buffers.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the SRT source with decoding. Properly closes SRT connection and disposes of GStreamer elements, decoders, and streaming resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
The DecodeBinElement wrapper element for advanced decoding configuration options.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The decode bin GStreamer element.
IsAvailable()
Determines whether SRT support with decoding is available on the current system. Requires GStreamer SRT source plugins, decode bin, and SRT libraries to be installed and functional.
public static bool IsAvailable()Returns
- bool
-
trueif SRT support with decoding is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this SRT source, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this SRT source.