Table of Contents

Class VideoBackendFactory

Namespace
Stride.Video
Assembly
Stride.Video.dll

Factory for a VideoBackend implementation. One factory instance is registered per-backend (typically via Register(VideoBackendFactory) from a module initializer). At Initialize() time, one factory is selected based on platform support and priority and bound to the system; CreateBackend(VideoInstance) is then called per VideoInstance.

public abstract class VideoBackendFactory
Inheritance
object
VideoBackendFactory
Derived
Extension Methods

Properties

Name

Stable identifier (e.g. "FFmpeg", "MediaEngine", "MediaCodec"). Used for PreferredBackendName matching.

public abstract string Name { get; }

Property Value

string

Priority

Higher value wins when multiple supported backends are registered and no preferred backend is set.

public abstract int Priority { get; }

Property Value

int

Methods

CreateBackend(VideoInstance)

Construct a backend bound to instance. Called once per VideoInstance.

public abstract VideoBackend CreateBackend(VideoInstance instance)

Parameters

instance VideoInstance

Returns

VideoBackend

DestroySystem(VideoSystem)

Counterpart to InitializeSystem(VideoSystem). Default: no-op.

public virtual void DestroySystem(VideoSystem system)

Parameters

system VideoSystem

InitializeSystem(VideoSystem)

Per-process / per-VideoSystem initialization (e.g. MFStartup, FFmpeg library preload). Called once when this factory is selected as the active backend. Default: no-op.

public virtual void InitializeSystem(VideoSystem system)

Parameters

system VideoSystem

IsSupported(GraphicsDevice)

Whether this backend can run on the current device/platform.

public abstract bool IsSupported(GraphicsDevice device)

Parameters

device GraphicsDevice

Returns

bool