Vixen
02b45cc4
csharp
public readonly record struct AudioTrackInfo

Everything a packet decoder needs to know before it sees a packet.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

CodecDelay is not optional for Opus. Every Opus stream begins with samples the encoder needed and the listener must not hear, and a decoder that plays them starts every track with a few milliseconds of artefact. Matroska states it twice — here, and inside the OpusHead — and this is the one that wins when they disagree, because it is the one the muxer wrote knowing what it had put in the clusters.

Fields and properties (6)

  • public string CodecId

    What the container called it — A_OPUS, A_PCM/INT/LIT. Matroska's spelling, for the reason VideoTrackInfo gives: a registry has to agree on one.

  • public int SampleRate

    What the container said the rate is.

  • public int Channels

    How many channels.

  • public int BitDepth

    How many bits a sample takes, for the uncompressed codecs. Zero otherwise.

  • public ReadOnlyMemory<byte> CodecPrivate

    The codec's own header — Opus's OpusHead — or empty.

  • public TimeSpan CodecDelay

    How much of the decoder's output at the start of the stream is priming rather than sound. Zero for a codec that has none.

Methods (1)

  • public AudioTrackInfo(string CodecId, int SampleRate, int Channels, int BitDepth = 0, ReadOnlyMemory<byte> CodecPrivate = default(ReadOnlyMemory<byte>), TimeSpan CodecDelay = default(TimeSpan))

    Everything a packet decoder needs to know before it sees a packet.

Used by (7)

  • AudioPacketDecoderRegistryVixen.Video
  • IAudioPacketDecoderFactoryVixen.Video
  • MatroskaAudioStreamDecoderVixen.Video
  • OpusAudioPacketDecoderVixen.Video.Codecs
  • OpusAudioPacketDecoderFactoryVixen.Video.Codecs
  • OpusAudioTrackTestsVixen.Video.Codecs.Tests
  • PcmPacketDecoderFactoryVixen.Video