Class VideoBackendFactory
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
-
objectVideoBackendFactory
- Derived
- Extension Methods
Properties
Name
Stable identifier (e.g. "FFmpeg", "MediaEngine", "MediaCodec"). Used for PreferredBackendName matching.
public abstract string Name { get; }
Property Value
Priority
Higher value wins when multiple supported backends are registered and no preferred backend is set.
public abstract int Priority { get; }
Property Value
Methods
CreateBackend(VideoInstance)
Construct a backend bound to instance. Called once per
VideoInstance.
public abstract VideoBackend CreateBackend(VideoInstance instance)
Parameters
instanceVideoInstance
Returns
DestroySystem(VideoSystem)
Counterpart to InitializeSystem(VideoSystem). Default: no-op.
public virtual void DestroySystem(VideoSystem system)
Parameters
systemVideoSystem
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
systemVideoSystem
IsSupported(GraphicsDevice)
Whether this backend can run on the current device/platform.
public abstract bool IsSupported(GraphicsDevice device)
Parameters
deviceGraphicsDevice