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
RTP packets, Audio stream and video stream callback functions

Functions

Int32 PortSIP.PortSIPLib.enableAudioStreamCallback (Int32 callbackObject, Int32 sessionId, Boolean enable, AUDIOSTREAM_CALLBACK_MODE callbackMode)
 Enable/disable the audio stream callback. More...
 
Int32 PortSIP.PortSIPLib.enableVideoStreamCallback (Int32 callbackObject, Int32 sessionId, VIDEOSTREAM_CALLBACK_MODE callbackMode)
 Enable/disable the video stream callback. More...
 

Detailed Description

Function Documentation

◆ enableAudioStreamCallback()

Int32 PortSIP.PortSIPLib.enableAudioStreamCallback ( Int32  callbackObject,
Int32  sessionId,
Boolean  enable,
AUDIOSTREAM_CALLBACK_MODE  callbackMode 
)

Enable/disable the audio stream callback.

Parameters
callbackObjectThe callback object that you passed in can be accessed once callback function triggered.
sessionIdThe session ID of call.
enableSet to true to enable audio stream callback, or false to stop the callback.
callbackModeThe audio stream callback mode
ModeDescription
AUDIOSTREAM_LOCAL_MIXCallback the audio stream from microphone for all channels.
AUDIOSTREAM_LOCAL_PER_CHANNELCallback the audio stream from microphone for one channel based on the given sessionId.
AUDIOSTREAM_REMOTE_MIXCallback the received audio stream that mixed all included channels.
AUDIOSTREAM_REMOTE_PER_CHANNELCallback the received audio stream for one channel based on the given sessionId.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
The onAudioRawCallback event will be triggered if the callback is enabled.

◆ enableVideoStreamCallback()

Int32 PortSIP.PortSIPLib.enableVideoStreamCallback ( Int32  callbackObject,
Int32  sessionId,
VIDEOSTREAM_CALLBACK_MODE  callbackMode 
)

Enable/disable the video stream callback.

Parameters
callbackObjectThe callback object that you passed in can be accessed once callback function triggered.
sessionIdThe session ID of call.
callbackModeThe video stream callback mode.
ModeDescription
VIDEOSTREAM_NONEDisable video stream callback.
VIDEOSTREAM_LOCALLocal video stream callback.
VIDEOSTREAM_REMOTERemote video stream callback.
VIDEOSTREAM_BOTHBoth local and remote video stream callback.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
The onVideoRawCallback event will be triggered if the callback is enabled.