Class VideoSource
- Namespace
- LiveKit.Rtc
- Assembly
- LivekitRtc.dll
Represents a video source for publishing video frames.
public class VideoSource : IDisposable
- Inheritance
-
VideoSource
- Implements
- Inherited Members
Constructors
VideoSource(int, int)
Initializes a new instance of the video source.
public VideoSource(int width, int height)
Parameters
widthintThe width of the video source in pixels.
heightintThe height of the video source in pixels.
Properties
Height
Gets the height of the video source in pixels.
public int Height { get; }
Property Value
Width
Gets the width of the video source in pixels.
public int Width { get; }
Property Value
Methods
CaptureFrame(VideoFrame, long, VideoRotation)
Captures a video frame and sends it to the video source.
public void CaptureFrame(VideoFrame frame, long timestampUs = 0, VideoRotation rotation = VideoRotation._0)
Parameters
frameVideoFrameThe video frame to capture.
timestampUslongOptional timestamp in microseconds. If 0, current time is used.
rotationVideoRotationOptional rotation to apply to the frame.
CreateTrack(string)
Creates a local video track from this video source.
public LocalVideoTrack CreateTrack(string name = "video")
Parameters
namestringThe name of the track.
Returns
- LocalVideoTrack
A new LocalVideoTrack.
Dispose()
Releases the native video source.
public void Dispose()