Jump to: navigation, search

SIP Endpoint SDK Video Support

This article discusses the video support that has been added to SIP Endpoint SDK. This support consists of:

Video Control

The IVideoControl interface is in the Genesyslab.Sip.Endpoint.Provider.CP namespace. It allows you to work with events and information related to:

These features are discussed in the following sections.

Video Source

This SDK provides methods to get or set video source–related information:

Method Description
bool HasCamera(); Returns true if the SDK has been configured to work with a camera.
String^ CameraStatus(); Returns the local video source status, using one of the following values: Stopped, Starting, Started, Failure.
String^ GetCameraName(); Returns the names of the devices currently being used for video.
array<String^>^ GetAllSystemCameraDevices(); Returns the names of all available cameras known to the operating system.
void ToggleCamera(bool start); Start or stop the video source; if the video source has been started, telling the camera to start will not affect the video source status — similarly, if the video source has been stopped, telling the camera to stop will not affect the video source status.
void PauseCamera(); Pause the currently used video camera.
void ResumeCamera(); Resume the live video from the currently used video camera.
array<int, 2>^ GetAvailableImageSizes(); Returns all available image sizes for this video source.
array<int>^ GetLocalVideoSize(); Returns local video size; [0] – width; [1] - height.
void SetLocalVideoSize(array<int>^ size); Set local video size; [0] – width; [1] - height.
int GetLocalVideoRate(); Returns local video frame rate.
void SetLocalVideoRate(int size); Set local video frame rate.

Video Frame Events

The SDK also provides video frame–related events:

Method Description
event EventHandler<EndpointEventArgs^>^

      LocalVideoWindowHandleRequired;

Provides notification that a local video frame has been received. A window handle is required to draw the frame.
event EventHandler<EndpointEventArgs^>^

      RemoteVideoWindowHandleRequired;

Provides notification that a video frame from the remote party has been received. A window handle is required to draw the frame.
event EventHandler<EndpointEventArgs^>^

      RemoteRequestToChangeCallOptionsReceived;

Provides notification that a request has been received from the other party (as SDP changes in a REINVITE) to change media.
event EventHandler<EndpointEventArgs^>^

      ErrorInVideoFrameDetected;

Provides notification that a corrupted video frame was received from the remote party.
event EventHandler<EndpointEventArgs^>^

      CameraDeviceFailed;

Provides notification that the configured camera could not be started.

Video Window Handles

The SDK provides methods to set up window handles for remote and local video streams:

Method Description
void SetRemoteVideoWindowHandle

      (String^ sessionID, IntPtr handle);

Set up a window handle to allow your application to draw frames being received from a remote party.
void SetLocalVideoWindowHandle

      (IntPtr handle);

Set up a window handle to allow your application to draw frames being received from the local camera.

Video Connectivity Mode

You can use the following methods to get or set the video connectivity mode:

Method Description
void SetDesiredVideoMode

      (String^ sessionID, ConnectivityMode state);

Set the desired video mode for the call session with Call-ID = sessionID, see the ConnectivityMode enum.
ConnectivityMode GetCurrentVideoMode

      (String^ sessionID);

Get the current video mode for the call session with Call-ID = sessionID, see the ConnectivityMode enum.

Video Connectivity Mode Settings

SIP Endpoint SDK provides the following enumerator to describe the possible video connectivity modes:

enum ConnectivityMode{
   None, 
   Inactive, 
   ToRemoteOnly, 
   FromRemoteOnly, 
   Bidirectional 
}
Setting Description
None No signaling, no media stream; there is no m-line in the SIP message.
Inactive Signaling is present, but the media stream is not to be included.
ToRemoteOnly The local party is to send the media stream to the remote party. The local party does not receive from the remote party.
FromRemoteOnly The local party is to receive the media stream. The local party does not send to the remote party.
Bidirectional The media stream is available in both directions.

Video Call Control

SIP Endpoint SDK’s ICallControl interface, which is in the Genesyslab.Sip.Endpoint.Provider.CP namespace, has been extended with these video control methods:

Method Description
void DialVideo

      (int accountId,
      String^ destination);

Start dialing to place an outgoing call from the connection with ID = accountId. Bidirectional videoMode is offered to the other party during the execution of this method.
void AnswerVideo

      (String^ sessionId);

Answer an incoming call with CallID = sessionId. Bidirectional videoMode is offered to the other party during the execution of this method.
void PauseOutgoingVideo

      (String^ sessionId,
      bool muteVideo);

Stop or start transmission to the other party of video that is being captured by the camera; for this CallID = sessionId only.
This page was last edited on July 26, 2016, at 22:15.
Comments or questions about this documentation? Contact us for support!