Class MediaFoundationCamera
A Windows webcam through Media Foundation's source reader: NV12 pictures of 640x480, converted to I420 and encoded by EncodingCamera; half size when the peer asks for less.
Inherited Members
Namespace: Uniform.Chat.Desktop.Cameras
Assembly: Uniform.Chat.dll
Syntax
public sealed class MediaFoundationCamera : EncodingCamera, IVideoCamera, IAsyncDisposable
Remarks
The COM interfaces are source-generated and declare their methods in the Windows SDK headers' vtable order up to the last one used; slots before it that are never called keep placeholders. Windows' camera privacy setting decides whether the app may open the camera.
Properties
| Edit this page View SourceCanSwitch
Whether another camera is attached.
Declaration
public override bool CanSwitch { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
| Edit this page View SourceAvailable()
Return whether this machine has a video capture device; false where Media Foundation is missing.
Declaration
public static bool Available()
Returns
| Type | Description |
|---|---|
| bool |
DisposeAsync()
Stop capturing and release the cameras.
Declaration
public override ValueTask DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask |
Overrides
| Edit this page View SourceStart()
Open the first camera and start capturing on a thread of its own.
Declaration
public override void Start()
Overrides
| Edit this page View SourceSwitchCamera()
Open the next camera.
Declaration
public override void SwitchCamera()