Table of Contents

Class OGGOpusOutputBlock

Namespace
VisioForge.Core.MediaBlocks.Sinks
Assembly
VisioForge.Core.dll

OGG Opus audio container output block for creating high-quality compressed audio files with modern codec technology. Provides professional audio file creation with configurable OPUS encoding within OGG container for superior audio quality at low bitrates, optimized for voice communication, music streaming, and modern web audio applications with royalty-free codec advantages. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class OGGOpusOutputBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

OGGOpusOutputBlock(string, OPUSEncoderSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sinks.OGGOpusOutputBlock class with custom OPUS encoder settings. Provides full control over audio compression parameters for professional OGG Opus file creation.

public OGGOpusOutputBlock(string filename, OPUSEncoderSettings settings)

Parameters

filename string

The output OGG file path where the OPUS-encoded audio content will be written.

settings OPUSEncoderSettings

The OPUS encoder settings controlling compression quality and parameters.

Properties

Input

Gets the audio input pad for receiving audio streams.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block (single audio input for OPUS encoding).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad (none for output blocks that write to files).

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (none for output blocks).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type identifier for OGG Opus output operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the OGG Opus output block within the pipeline context. Creates the OGG sink, OPUS encoder, and establishes all necessary connections for encoding and writing audio content to the OGG file.

public override bool Build()

Returns

bool

true if the OGG Opus output block was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the OGG Opus output operations, including encoder, sink, and file handles.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources used by the OGG Opus output block. Properly disposes of GStreamer elements, encoder, and file writing resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to 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 OGG Opus content is being written.

public string GetFilenameOrURL()

Returns

string

The file path or URL string for the OGG Opus output destination.

IsAvailable()

Determines whether OGG Opus output functionality is available on the current system. Requires GStreamer OGG muxer, OPUS encoder, and file sink plugins to be installed and functional.

public static bool IsAvailable()

Returns

bool

true if OGG Opus output is supported; otherwise, false.

SetFilenameOrURL(string)

Updates the output filename or URL for the OGG file destination, allowing dynamic output redirection.

public void SetFilenameOrURL(string value)

Parameters

value string

The new file path or URL where OGG Opus content should be written.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this OGG Opus output block, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this OGG Opus output block.

See Also