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 AudioFormatXExtensionsInheritance
Inherited Members
Methods
ToGstName(AudioFormatX)
Gets the name GStreamer uses for this format in caps.
public static string ToGstName(this AudioFormatX format)Parameters
formatAudioFormatX-
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
namestring-
The name as it appears in caps.
formatAudioFormatX-
The parsed format, VisioForge.Core.Types.X.AudioFormatX.Unknown on failure.
Returns
- bool
-
truewhen the name maps to a member of the enum. A raw-audio name the enum has no member for -S20_32LEand its siblings - fails rather than mapping to something else, and so does every non-raw name.