Interface IVideoCamera
A camera with its VP8 encoder, as a platform gives it for a call's video, e.g. Android's camera and hardware encoder; started when the call connects, disposed when it ends.
Inherited Members
Namespace: Uniform.Matrix.Calls
Assembly: Uniform.Matrix.Calls.dll
Syntax
public interface IVideoCamera : IAsyncDisposable
Properties
| Edit this page View SourceCanSwitch
Whether the device has another camera to switch to.
Declaration
bool CanSwitch { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Rotation
Clockwise rotation in degrees that shows the camera's pictures upright, 0, 90, 180 or 270, as the device is held now.
Declaration
int Rotation { get; }
Property Value
| Type | Description |
|---|---|
| int |
Upright
Whether to turn the pictures upright before encoding, as the connection cannot tell the receiver their Rotation, e.g. through LiveKit; set before Start(). Cameras whose pictures are upright already ignore it.
Declaration
bool Upright { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceLimitBitrate(long)
Send at most bitsPerSecond, as the peer asked, e.g. with a lower resolution and frame rate; nothing where the camera cannot.
Declaration
void LimitBitrate(long bitsPerSecond)
Parameters
| Type | Name | Description |
|---|---|---|
| long | bitsPerSecond |
RequestKeyframe()
Make the next frame a keyframe, e.g. when the peer lost packets.
Declaration
void RequestKeyframe()
SetPaused(bool)
Stop capturing, e.g. when the user turns the camera off, or start again; nothing where the camera cannot.
Declaration
void SetPaused(bool paused)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | paused |
Start()
Start capturing and encoding.
Declaration
void Start()
SwitchCamera()
Switch to the device's next camera, e.g. from the front to the back; nothing with one camera.
Declaration
void SwitchCamera()
Events
| Edit this page View SourceFrameEncoded
Raised with each encoded VP8 frame, the first a keyframe; on any thread.
Declaration
event Action<byte[]>? FrameEncoded
Event Type
| Type | Description |
|---|---|
| Action<byte[]> |
Previewed
Raised with small pictures of what the camera sees, for a preview, a few per second; on any thread. Cameras without a preview never raise it.
Declaration
event Action<VideoFrame>? Previewed
Event Type
| Type | Description |
|---|---|
| Action<VideoFrame> |