Vixen
02b45cc4
csharp
public sealed class VideoPlayback

A clip, opened: a player, its sound, and everything holding the file.

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

Remarks

The missing half of VideoClip. The importer writes down what is in a video and where its bytes are; this is what turns that record into something that plays. Without it a game has an address it cannot do anything with and has to know the file path anyway, which is the whole of what an address exists to avoid.

It owns what it opened and nothing else. Disposing this closes the demuxers and the streams under them and disposes the player; the Clip and the content source belong to the caller. The audio provider is not registered with a mixer here — that is the caller's, because a mixer is a thing a game has one of and this is not the place to guess which.

Fields and properties (4)

  • public VideoClip Clip

    What was opened.

  • public VideoPlayer Player

    The picture.

  • public MatroskaAudioStreamDecoder? Audio

    The sound, or null if there is none or nothing could decode it.

  • public string AudioUnavailableReason

    Why there is no Audio, or empty if there is.

Methods (4)

  • public static bool CanPlay(VideoClip clip)

    Whether a codec is registered for this clip's picture.

  • public static VideoPlayback Open(VideoClip clip, IVideoContentSource content, VideoPlaybackOptions? options = null)

    Opens a clip.

  • public bool FollowAudio(IAudioSampleProvider provider, TimeSpan offset = default(TimeSpan))

    Makes the picture follow the sound, if there is any.

  • public void Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Used by (1)

  • VideoPlaybackTestsVixen.Video.Tests