Class SeparateOutputBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sinks
- Assembly
- VisioForge.Core.dll
Separate output block for independent recording with custom video and audio encoder configuration. Provides isolated recording pipeline with bridge source connections allowing independent recording operations from preview pipeline, enabling simultaneous preview display and background recording with custom encoder blocks and flexible output configuration. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class SeparateOutputBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
SeparateOutputBlock(MediaBlocksPipeline, SeparateOutput, BridgeVideoSourceSettings, BridgeAudioSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sinks.SeparateOutputBlock class with custom pipeline configuration. Creates an independent recording pipeline with bridge sources for receiving data from the main pipeline.
public SeparateOutputBlock(MediaBlocksPipeline pipeline, SeparateOutput settings, BridgeVideoSourceSettings bridgeVideoSourceSettings, BridgeAudioSourceSettings bridgeAudioSourceSettings)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this separate output block.
settingsSeparateOutput-
The separate output configuration settings defining encoders and processing blocks.
bridgeVideoSourceSettingsBridgeVideoSourceSettings-
The bridge video source settings for receiving video data from main pipeline.
bridgeAudioSourceSettingsBridgeAudioSourceSettings-
The bridge audio source settings for receiving audio data from main pipeline.
Exceptions
- ArgumentNullException
-
_sink.
- ArgumentException
-
Sink must support dynamic inputs interface (IMediaBlockDynamicInputs).
Properties
Input
Gets the primary input pad (none for separate output blocks that use bridge sources).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for separate output blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad (none for output blocks that write to destinations).
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (none for output blocks).
public override MediaBlockPad[] Outputs { get; }Property Value
Type
Gets the media block type identifier for separate output operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the separate output block within the pipeline context. Creates all encoder blocks, source bridges, and establishes connections for independent recording operations.
public override bool Build()Returns
- bool
-
trueif the separate output block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the separate output operations, including bridge sources and encoder blocks.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the separate output block. Properly disposes of bridge sources, encoders, and pipeline connections.
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
-
Always null for composite output blocks with multiple internal elements.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
Always null for composite output blocks with multiple internal elements.
GetFilenameOrURL()
Gets the current output filename or URL where the separate recording is being written.
public string GetFilenameOrURL()Returns
- string
-
The file path or URL string for the separate recording destination.
SetFilenameOrURL(string)
Updates the output filename or URL for the separate recording destination, allowing dynamic output redirection.
public void SetFilenameOrURL(string filename)Parameters
filenamestring-
The new file path or URL where the separate recording should be written.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this separate output block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this separate output block.