Table of Contents

Class OPUSEncoderPage

Namespace
VisioForge.Core.UI.WPF.Dialogs.OutputFormats.Pages
Assembly
VisioForge.Core.dll

Configuration page for the Opus audio encoder.

public class OPUSEncoderPage : Page, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, INotifyPropertyChanged, IComponentConnector

Inheritance

Implements

Inherited Members

Remarks

Opus is a modern, open-source audio codec designed to efficiently code speech and general audio in a single format. It provides excellent quality at low bitrates and scales from narrow-band speech at 6 kbps to high-quality stereo music at 510 kbps. Opus is standardized by the IETF as RFC 6716 and is widely supported in WebRTC, streaming, and VoIP applications.

Key features of the Opus encoder: - Hybrid codec combining SILK (speech) and CELT (music) technologies - Wide bitrate range from 6 to 510 kbps - Support for mono and stereo audio - Multiple rate control modes (VBR, CBR, constrained VBR) - Low latency suitable for real-time communication - Excellent quality at low bitrates for voice applications

Common use cases: - VoIP and video conferencing (WebRTC) - Streaming audio over limited bandwidth - Podcast and audiobook encoding - Game audio and interactive applications - Internet radio broadcasting

This page provides configuration options for bitrate and rate control mode selection, allowing optimization for different audio content types and network conditions.

Constructors

OPUSEncoderPage()

Initializes a new instance of the VisioForge.Core.UI.WPF.Dialogs.OutputFormats.Pages.OPUSEncoderPage class.

public OPUSEncoderPage()

Properties

Bitrate

Gets or sets the target bitrate for Opus audio encoding.

public int Bitrate { get; set; }

Property Value

int

Bitrates

Gets or sets the collection of available bitrate options for the Opus encoder.

public ObservableCollection<int> Bitrates { get; set; }

Property Value

ObservableCollection<int>

RateControl

Gets or sets the rate control algorithm for bitrate management.

public OPUSRateControl RateControl { get; set; }

Property Value

OPUSRateControl

RateControlModes

Gets or sets the collection of available rate control modes for the encoder.

public ObservableCollection<string> RateControlModes { get; set; }

Property Value

ObservableCollection<string>

RateControlStr

Gets or sets the rate control mode (as string).

public string RateControlStr { get; set; }

Property Value

string

Methods

Fill(ref OPUSEncoderSettings)

Fills the provided settings object with current values from the UI controls.

public void Fill(ref OPUSEncoderSettings settings)

Parameters

settings OPUSEncoderSettings

The Opus encoder settings object to populate with the currently configured bitrate and rate control mode.

GetPageType()

Gets the type of encoder settings this page configures.

public Type GetPageType()

Returns

Type

The Type object representing OPUSEncoderSettings.

Init(OPUSEncoderSettings)

Initializes the encoder page with existing Opus encoder settings.

public void Init(OPUSEncoderSettings settings)

Parameters

settings OPUSEncoderSettings

The Opus encoder settings to load into the UI controls, including bitrate and rate control mode.

InitializeComponent()

InitializeComponent

public void InitializeComponent()

OnPropertyChanged(string)

OnPropertyChanged API.

protected virtual void OnPropertyChanged(string propertyName = null)

Parameters

propertyName string

Property name.

SetProperty<T>(ref T, T, string)

Sets the property.

protected bool SetProperty<T>(ref T field, T newValue, string propertyName = null)

Parameters

field T

The field.

newValue T

The new value.

propertyName string

Name of the property.

Returns

bool

true if successful, false otherwise.

Type Parameters

T

T.

PropertyChanged

Property changed event.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler