Table of Contents

Class AudioFormatXExtensions

Namespace
VisioForge.Core.Types.X
Assembly
VisioForge.Core.dll

Conversions between VisioForge.Core.Types.X.AudioFormatX and the format names GStreamer writes in caps.

The two spellings agree everywhere except the 24-in-32 formats: GStreamer writes S24_32LE, the enum member is S2432LE. Using ToString() and Enum.TryParse directly on those silently loses them in both directions - a caps string that never negotiates one way, a dropped format the other.

public static class AudioFormatXExtensions

Inheritance

Inherited Members

Methods

ToGstName(AudioFormatX)

Gets the name GStreamer uses for this format in caps.

public static string ToGstName(this AudioFormatX format)

Parameters

format AudioFormatX

The format.

Returns

string

The GStreamer caps name.

TryParseGstName(string, out AudioFormatX)

Parses a GStreamer caps format name.

public static bool TryParseGstName(string name, out AudioFormatX format)

Parameters

name string

The name as it appears in caps.

format AudioFormatX

The parsed format, VisioForge.Core.Types.X.AudioFormatX.Unknown on failure.

Returns

bool

true when the name maps to a member of the enum. A raw-audio name the enum has no member for - S20_32LE and its siblings - fails rather than mapping to something else, and so does every non-raw name.