Table of Contents

Class CDGSourceBlock

Namespace
VisioForge.Core.MediaBlocks.Sources
Assembly
VisioForge.Core.dll

CDG (Compact Disc plus Graphics) karaoke source block for synchronized audio and graphics playback with integrated decoders. Provides karaoke and multimedia presentation functionality by combining CDG graphics files with audio tracks for synchronized visual displays, subtitle rendering, and interactive entertainment applications with professional karaoke system integration. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class CDGSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

CDGSourceBlock(CDGSourceSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.CDGSourceBlock class with CDG and audio file configuration. Configures synchronized CDG graphics and audio playback for karaoke and multimedia presentation applications. Supports both standalone CDG+Audio files and ZIP archives containing CDG+MP3/WAV pairs.

public CDGSourceBlock(CDGSourceSettings settings)

Parameters

settings CDGSourceSettings

The CDG source settings containing file paths, synchronization options, and audio processing parameters.

Properties

AudioOutput

Gets the audio output pad that provides synchronized audio track for karaoke playback.

public MediaBlockPad AudioOutput { get; }

Property Value

MediaBlockPad

Input

Gets the primary input pad (none for source blocks that read from files).

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

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

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad (video output for CDG graphics).

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (video and optionally audio outputs).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the CDG source configuration settings that control file paths and playback options.

public CDGSourceSettings Settings { get; set; }

Property Value

CDGSourceSettings

Type

Gets the media block type identifier for CDG karaoke source operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

VideoOutput

Gets the video output pad that provides CDG graphics as video frames for karaoke display.

public MediaBlockPad VideoOutput { get; }

Property Value

MediaBlockPad

Methods

Build()

Builds and initializes the CDG source within the pipeline context. Opens CDG and audio files, configures synchronization, and establishes video and audio outputs for karaoke playback. Supports both standalone CDG+Audio files and ZIP archives containing CDG+MP3/WAV pairs.

public override bool Build()

Returns

bool

true if the CDG source was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the CDG karaoke operations, including file handles and media buffers.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources used by the CDG karaoke source. Properly closes file handles, disposes of GStreamer elements, and cleans up temporary ZIP extraction files.

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 source blocks with multiple internal elements.

GetElement()

Gets the native GStreamer element for direct GStreamer pipeline integration.

public Element GetElement()

Returns

Element

The CDG source GStreamer element.

IsAvailable()

Determines whether CDG karaoke source functionality is available on the current system. Requires GStreamer CDG decoder and audio decoder plugins to be installed and functional.

public static bool IsAvailable()

Returns

bool

true if CDG source support is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this CDG source, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this CDG karaoke source.

See Also