OpenTok.VideoCapturer

public class VideoCapturer : OpenTok.IVideoCapturer, IDisposable

Use VideoCapturer.EnumerateDevices() to get a list of available video devices (cameras). Use one of the CreateVideoCapturer() methods of the VideoDevice class to instantiate a VideoCapturer object.

The VideoCapturer class implements the System.IDisposable interface. Be sure to call the Dispose() method of the VideoCapturer object to release its resources when you no longer need the object (for example, when the Publisher using the capturer is removed or when the app or window is closing).

Nested types: OpenTok.VideoCapturer.VideoDevice, OpenTok.VideoCapturer.VideoFormat

enum Resolution

Enumerates common pre-defined video resolutions.

Name Description
Low The lowest available camera capture resolution supported in the OpenTok Windows SDK (320x240) or the closest resolution supported on the system.
Medium VGA resolution (640x480) or the closest resolution supported on the system.
High HD resolution (1280x720) or the closest resolution supported on the device.
High1080p 1080p resolution (1920x1080), the highest available camera capture resolution supported in the OpenTok Windows SDK, or the closest resolution supported on the device. For important considerations in using 1080p video, see this developer guide.

enum FrameRate

Enumerates common pre-defined video frame rates.

Name Value Description
Fps30 30 30 frames per second.
Fps15 15 15 frames per second.
Fps7 7 7 frames per second.
Fps1 1 1 frame1 per second.

Methods

Name Description
Destroy() Called when the Publisher object using this VideoFrameConsumer is destroyed.
Dispose() Disposes of the VideoCapturer object's resources.
Dispose(disposing)
(static) EnumerateDevices() → {IList<VideoDevice>}
GetCaptureSettings() → {VideoCaptureSettings} The OpenTok Windows SDK calls this method to get the video settings for the video capturer.
GetVideoContentHint() → {VideoContentHint} This method will return the current value of video content hint.
Init(frameConsumer)
SetVideoContentHint(contentHint) This method will set the video content hint to one of the enum values given in VideoContentHint.
Start() Called when the Publisher starts publishing video.
Stop() Called when the Publisher stops publishing video.

Destroy()

Called when the Publisher object using this VideoFrameConsumer is destroyed.

Dispose()

Disposes of the VideoCapturer object's resources.

Dispose(disposing)

Parameters:
Name Type Description
disposing bool

(static) EnumerateDevices() → {IList<VideoDevice>}

Returns:

A list of VideoDevice objects, representing available video devices on the system.

GetCaptureSettings() → {VideoCaptureSettings}

The OpenTok Windows SDK calls this method to get the video settings for the video capturer. In your implementation of this method, create a new settings object to define the video settings to be used.

Returns:

VideoCaptureSettings

GetVideoContentHint() → {VideoContentHint}

This method will return the current value of video content hint.

Returns:

VideoContentHint

Init(frameConsumer)

Parameters:
Name Type Description
frameConsumer IVideoFrameConsumer The instance of the IVideoFrameConsumer to use.

SetVideoContentHint(contentHint)

This method will set the video content hint to one of the enum values given in VideoContentHint. By default it will be set to NONE.

Parameters:
Name Type Description
contentHint VideoContentHint

Start()

Called when the Publisher starts publishing video. Call the IVideoFrameConsumer.Consume(VideoFrame) method whenever a new frame is available.

Stop()

Called when the Publisher stops publishing video.