Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

OpenTok.VideoCapturer

A video capturer implementation that captures video from on of the cameras available on the system. More...

Inherits OpenTok.IVideoCapturer, and IDisposable.

Classes

class  VideoDevice
 Defines a video device (such as a camera). More...
class  VideoFormat
 Defines a video format available to a video device. More...

Public Types

enum  Resolution { Resolution.Low, Resolution.Medium, Resolution.High, Resolution.High1080p }
 Enumerates common pre-defined video resolutions. More...
enum  FrameRate { FrameRate.Fps30 = 30, FrameRate.Fps15 = 15, FrameRate.Fps7 = 7, FrameRate.Fps1 = 1 }
 Enumerates common pre-defined video frame rates. More...

Public Member Functions

void Init (IVideoFrameConsumer frameConsumer)
 Initializes the VideoCapturer with a video frame consumer. More...
void SetVideoContentHint (VideoContentHint 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 More...
VideoContentHint GetVideoContentHint ()
 This method will return the current value of video content hint. More...
void Start ()
 Called when the Publisher starts publishing video. Call the IVideoFrameConsumer.Consume(VideoFrame) method whenever a new frame is available. More...
void Stop ()
 Called when the Publisher stops publishing video. More...
void Destroy ()
 Called when the Publisher object using this VideoFrameConsumer is destroyed. More...
VideoCaptureSettings GetCaptureSettings ()
 The Vonage Video API 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. More...
void Dispose ()
 Disposes of the VideoCapturer object's resources. More...

Static Public Member Functions

static IList< VideoDeviceEnumerateDevices ()
 Returns a list of available video devices on the system. More...

Protected Member Functions

virtual void Dispose (bool disposing)

Detailed Description

A video capturer implementation that captures video from on of the cameras available on the system.

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).

Member Enumeration Documentation

◆ FrameRate

Enumerates common pre-defined video frame rates.

Enumerator
Fps30 

30 frames per second.

Fps15 

15 frames per second.

Fps7 

7 frames per second.

Fps1 

1 frame1 per second.

◆ Resolution

Enumerates common pre-defined video resolutions.

Enumerator
Low 

The lowest available camera capture resolution supported in the Vonage Video API 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 Vonage Video API Windows SDK, or the closest resolution supported on the device. For important considerations in using 1080p video, see this developer guide.

Member Function Documentation

◆ Destroy()

void OpenTok.VideoCapturer.Destroy ( )

Called when the Publisher object using this VideoFrameConsumer is destroyed.

Implements OpenTok.IVideoCapturer.

◆ Dispose()

void OpenTok.VideoCapturer.Dispose ( )

Disposes of the VideoCapturer object's resources.

◆ EnumerateDevices()

static IList<VideoDevice> OpenTok.VideoCapturer.EnumerateDevices ( )

Returns a list of available video devices on the system.

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

◆ GetCaptureSettings()

VideoCaptureSettings OpenTok.VideoCapturer.GetCaptureSettings ( )

The Vonage Video API 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.

Implements OpenTok.IVideoCapturer.

◆ GetVideoContentHint()

VideoContentHint OpenTok.VideoCapturer.GetVideoContentHint ( )

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

Implements OpenTok.IVideoCapturer.

◆ Init()

void OpenTok.VideoCapturer.Init ( IVideoFrameConsumer  frameConsumer)

Initializes the VideoCapturer with a video frame consumer.

Parameters
frameConsumerThe instance of the IVideoFrameConsumer to use.

Implements OpenTok.IVideoCapturer.

◆ SetVideoContentHint()

void OpenTok.VideoCapturer.SetVideoContentHint ( VideoContentHint  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

Implements OpenTok.IVideoCapturer.

◆ Start()

void OpenTok.VideoCapturer.Start ( )

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

Implements OpenTok.IVideoCapturer.

◆ Stop()

void OpenTok.VideoCapturer.Stop ( )

Called when the Publisher stops publishing video.

Implements OpenTok.IVideoCapturer.