Vixen
02b45cc4
csharp
public interface IVideoStreamDecoder

Turns whatever a video is stored as into frames, one at a time.

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

Remarks

This is the seam a codec plugs into, and the reason the engine links none. It is deliberately the same bargain IAudioStreamDecoder makes: the runtime knows the interface and decides nothing about what implements it. A game whose only video is an uncompressed logo sting should not carry a VP9 decoder, and a game that needs one should not have the engine's choice of decoder forced on it.

Called from the decode thread, never from the frame. Blocking here is expected — DecodeNext may take a disk read and several milliseconds of arithmetic. The frame queue in front of it is what stops that being visible. See VideoPlayer, which owns the thread.

The caller owns the frame. Decoding writes into a frame the caller rented, rather than returning one the decoder owns, so that a pool can exist at all and so that a decoder never has to answer "when may I reuse this?".

Fields and properties (5)

  • VideoFormat Format

    The size and layout it produces.

  • Int2 DisplaySize

    How big the picture is meant to look, which is not always how big it is.

  • TimeSpan Duration

    How long the whole video is, or Zero if the container does not say.

  • TimeSpan Position

    Where the decoder has got to.

  • bool CanSeek

    Whether Seek works.

Methods (2)

Used by (6)

  • VideoGameVideoPlayback
  • StarvedDecoderVixen.Video.Tests
  • StepDecoderVixen.Video.Tests
  • VideoPlaybackTestsVixen.Video.Tests
  • VideoPlayerVixen.Video
  • WebMVideoStreamDecoderVixen.Video