ScreenSource

namespace VideoKit.Sources {
    /// <summary>
    /// Media source for generating pixel buffers from the screen.
    /// </summary>
    class ScreenSource : IDisposable { ... }   
}

INCOMPLETE


Creating a Screen Source

INCOMPLETE

With a Media Recorder

/// <summary>
/// Create a screen source.
/// </summary>
/// <param name="recorder">Media recorder to receive images.</param>
/// <param name="clock">Clock for generating image timestamps.</param>
/// <param name="useLateUpdate">Whether to use` LateUpdate` instead of end of frame for capturing frames. See #52.</param>
ScreenSource (
    MediaRecorder recorder,
    IClock? clock = null,
    bool useLateUpdate = false
);

INCOMPLETE

With a Pixel Buffer Handler

/// <summary>
/// Create a screen source.
/// </summary>
/// <param name="width">Image width.</param>
/// <param name="height">Image height.</param>
/// <param name="handler">Handler to receive images.</param>
/// <param name="clock">Clock for generating image timestamps.</param>
/// <param name="useLateUpdate">Whether to use` LateUpdate` instead of end of frame for capturing frames. See #52.</param>
ScreenSource (
    int width,
    int height,
    Action<PixelBuffer> handler,
    IClock? clock = null,
    bool useLateUpdate = false
);

INCOMPLETE


Inspecting the Texture Source

/// <summary>
/// Texture source used to create pixel buffers from the screen texture.
/// </summary>
TextureSource textureSource { get; }

INCOMPLETE


Skipping Successive Frames

/// <summary>
/// Control number of successive frames to skip while recording.
/// This is very useful for GIF recording, which typically has a lower framerate appearance.
/// </summary>
int frameSkip { get; set; } = 0;

INCOMPLETE


Disposing the Source

/// <summary>
/// Stop the screen source and release resources.
/// </summary>
void Dispose ();

INCOMPLETE


Was this page helpful?