PortSIP VoIP SDK Manual for Windows  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Access SIP message header functions

Functions

Int32 PortSIP.PortSIPLib.setAudioDeviceId (Int32 recordingDeviceId, Int32 playoutDeviceId)
 Set the audio device that will be used for audio call. More...
 
Int32 PortSIP.PortSIPLib.setVideoDeviceId (Int32 deviceId)
 Set the video device that will be used for video call. More...
 
Int32 PortSIP.PortSIPLib.setVideoResolution (Int32 width, Int32 height)
 Set the video capturing resolution. More...
 
Int32 PortSIP.PortSIPLib.setAudioBitrate (Int32 sessionId, AUDIOCODEC_TYPE audioCodecType, Int32 bitrateKbps)
 Set the audio bitrate. More...
 
Int32 PortSIP.PortSIPLib.setVideoBitrate (Int32 sessionId, Int32 bitrateKbps)
 Set the video bitrate. More...
 
Int32 PortSIP.PortSIPLib.setVideoFrameRate (Int32 sessionId, Int32 frameRate)
 Set the video frame rate. More...
 
Int32 PortSIP.PortSIPLib.sendVideo (Int32 sessionId, Boolean sendState)
 Send the video to remote side. More...
 
void PortSIP.PortSIPLib.muteMicrophone (Boolean mute)
 Mute the device microphone. It's unavailable for Android and iOS. More...
 
void PortSIP.PortSIPLib.muteSpeaker (Boolean mute)
 Mute the device speaker. It's unavailable for Android and iOS. More...
 
void PortSIP.PortSIPLib.setChannelOutputVolumeScaling (Int32 sessionId, Int32 scaling)
 
void PortSIP.PortSIPLib.setLocalVideoWindow (IntPtr localVideoWindow)
 Set the window that is used to display the local video image. More...
 
Int32 PortSIP.PortSIPLib.setRemoteVideoWindow (Int32 sessionId, IntPtr remoteVideoWindow)
 Set the window for a session that is used to display the received remote video image. More...
 
Int32 PortSIP.PortSIPLib.displayLocalVideo (Boolean state)
 Start/stop displaying the local video image. More...
 
Int32 PortSIP.PortSIPLib.setVideoNackStatus (Boolean state)
 Enable/disable the NACK feature (rfc6642) that helps to improve the video quality. More...
 

Detailed Description

Function Documentation

◆ setAudioDeviceId()

Int32 PortSIP.PortSIPLib.setAudioDeviceId ( Int32  recordingDeviceId,
Int32  playoutDeviceId 
)

Set the audio device that will be used for audio call.

Parameters
recordingDeviceIdDevice ID (index) for audio recording. (Microphone).
playoutDeviceIdDevice ID (index) for audio playback (Speaker).
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoDeviceId()

Int32 PortSIP.PortSIPLib.setVideoDeviceId ( Int32  deviceId)

Set the video device that will be used for video call.

Parameters
deviceIdDevice ID (index) for video device (camera).
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoResolution()

Int32 PortSIP.PortSIPLib.setVideoResolution ( Int32  width,
Int32  height 
)

Set the video capturing resolution.

Parameters
widthVideo width.
heightVideo height.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setAudioBitrate()

Int32 PortSIP.PortSIPLib.setAudioBitrate ( Int32  sessionId,
AUDIOCODEC_TYPE  audioCodecType,
Int32  bitrateKbps 
)

Set the audio bitrate.

Parameters
bitrateKbpsThe audio bitrate in KBPS.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoBitrate()

Int32 PortSIP.PortSIPLib.setVideoBitrate ( Int32  sessionId,
Int32  bitrateKbps 
)

Set the video bitrate.

Parameters
bitrateKbpsThe video bitrate in KBPS.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoFrameRate()

Int32 PortSIP.PortSIPLib.setVideoFrameRate ( Int32  sessionId,
Int32  frameRate 
)

Set the video frame rate.

Parameters
frameRateThe frame rate value with minimum value 5, and maximum value 30. A greater value will enable you better video quality but requires more bandwidth.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
Usually you do not need to call this function to set the frame rate. The SDK uses default frame rate.

◆ sendVideo()

Int32 PortSIP.PortSIPLib.sendVideo ( Int32  sessionId,
Boolean  sendState 
)

Send the video to remote side.

Parameters
sessionIdThe session ID of the call.
sendStateSet to true to send the video, or false to stop sending.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ muteMicrophone()

void PortSIP.PortSIPLib.muteMicrophone ( Boolean  mute)

Mute the device microphone. It's unavailable for Android and iOS.

Parameters
muteIf the value is set to true, the microphone will be muted. You may also set it to false to un-mute it.

◆ muteSpeaker()

void PortSIP.PortSIPLib.muteSpeaker ( Boolean  mute)

Mute the device speaker. It's unavailable for Android and iOS.

Parameters
muteIf the value is set to true, the speaker is muted. You may also set it to false to un-mute it.

◆ setChannelOutputVolumeScaling()

void PortSIP.PortSIPLib.setChannelOutputVolumeScaling ( Int32  sessionId,
Int32  scaling 
)

Set a volume |scaling| to be applied to the outgoing signal of a specific audio channel.

Parameters
sessionIdThe session ID of the call.
scalingValid scale ranges [0, 1000]. Default is 100.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setLocalVideoWindow()

void PortSIP.PortSIPLib.setLocalVideoWindow ( IntPtr  localVideoWindow)

Set the window that is used to display the local video image.

Parameters
localVideoWindowThe window on which the local video image from camera will be displayed.

◆ setRemoteVideoWindow()

Int32 PortSIP.PortSIPLib.setRemoteVideoWindow ( Int32  sessionId,
IntPtr  remoteVideoWindow 
)

Set the window for a session that is used to display the received remote video image.

Parameters
sessionIdThe session ID of the call.
remoteVideoWindowThe window to display received remote video image.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ displayLocalVideo()

Int32 PortSIP.PortSIPLib.displayLocalVideo ( Boolean  state)

Start/stop displaying the local video image.

Parameters
stateSet to true to display local video image.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoNackStatus()

Int32 PortSIP.PortSIPLib.setVideoNackStatus ( Boolean  state)

Enable/disable the NACK feature (rfc6642) that helps to improve the video quality.

Parameters
stateSet to true to enable.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.