Class V4l2Camera
A Linux webcam through Video4Linux2: YUYV pictures of 640x480 from memory-mapped buffers, converted to I420 and encoded by EncodingCamera; 320x240 when the peer asks for less.
Inherited Members
Namespace: Uniform.Chat.Desktop.Cameras
Assembly: Uniform.Chat.dll
Syntax
public sealed class V4l2Camera : EncodingCamera, IVideoCamera, IAsyncDisposable
Remarks
Only open, ioctl, mmap, munmap and close of libc are called; the structures are byte arrays at the offsets of 64-bit Linux. Inter frames between keyframes keep the bitrate down; a keyframe request makes the next frame one.
Properties
| Edit this page View SourceCanSwitch
Whether another device captures, as counted at start; a webcam's metadata node does not.
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 device that captures, e.g. /dev/video0.
Declaration
public static bool Available()
Returns
| Type | Description |
|---|---|
| bool |
DisposeAsync()
Stop capturing and close the device.
Declaration
public override ValueTask DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask |
Overrides
| Edit this page View SourceStart()
Open the first capture device and start capturing on a thread of its own.
Declaration
public override void Start()
Overrides
| Edit this page View SourceSwitchCamera()
Open the next video device that captures, after the current one.
Declaration
public override void SwitchCamera()