Vixen
02b45cc4
csharp
public sealed class MatroskaTrack

One track of a Matroska segment, as the header described it.

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

Remarks

The fields a player needs and no more. What is deliberately absent is anything to do with editing — track names, languages, flags, chapters, tags — which a container reader for playback never looks at and which would be a tenfold larger parser.

CodecPrivate is passed through untouched. It is the codec's own header — Opus's OpusHead, VP9's nothing, AVC's parameter sets — and the demuxer is emphatically not in the business of understanding it.

Fields and properties (18)

  • public int Number

    The number blocks refer to this track by.

  • public ulong Uid

    The writer's unique id for it, for logs.

  • public MatroskaTrackKind Kind

    What it carries.

  • public string CodecId

    The codec id — V_VP9, A_OPUS, V_UNCOMPRESSED.

  • public ReadOnlyMemory<byte> CodecPrivate

    The codec's own initialisation bytes, or empty if it needs none.

  • public TimeSpan DefaultDuration

    How long one frame lasts, or zero if the track does not say.

  • public TimeSpan CodecDelay

    How much of the decoder's output at the start of the stream is priming, not sound.

  • public TimeSpan SeekPreRoll

    How much must be decoded and thrown away after a seek before the output is right.

  • public int PixelWidth

    The coded width in samples. Zero for a track that is not video.

  • public int PixelHeight

    The coded height in samples.

  • public int DisplayWidth

    The width it should be shown at, which is the coded width unless it says otherwise.

  • public int DisplayHeight

    The height it should be shown at.

  • public string ColourSpace

    The FourCC an uncompressed video track's samples are in, or empty.

  • public VideoColourMatrix ColourMatrix

    Which coefficients the samples were made with.

  • public VideoColourRange ColourRange

    Whether the samples use the whole range.

  • public int SampleRate

    Frames a second. Zero for a track that is not audio.

  • public int Channels

    How many channels.

  • public int BitDepth

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

Used by (6)

  • VideoGameVideoPlayback
  • MatroskaAudioStreamDecoderVixen.Video
  • MatroskaDemuxerVixen.Video
  • MatroskaDemuxerTestsVixen.Video.Tests
  • WebMVideoStreamDecoderVixen.Video
  • VideoImporterVixen.Editor.Assets