PortSIP VoIP SDK Manual for iOS  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

(int) - PortSIPSDK::setRtpCallback:
 Set the RTP callbacks to allow to access the sent and received RTP packets. More...
 
(int) - PortSIPSDK::enableAudioStreamCallback:enable:callbackMode:
 Enable/disable the audio stream callback. More...
 
(int) - PortSIPSDK::enableVideoStreamCallback:callbackMode:
 Enable/disable the video stream callback. More...
 

Detailed Description

Function Documentation

◆ setRtpCallback:()

- (int) setRtpCallback: (BOOL)  enable

Set the RTP callbacks to allow to access the sent and received RTP packets.

Parameters
enableSet to true to enable the RTP callback for received and sent RTP packets. The onSendingRtpPacket and onReceivedRtpPacket events will be triggered.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ enableAudioStreamCallback:enable:callbackMode:()

- (int) enableAudioStreamCallback: (long)  sessionId
enable: (BOOL)  enable
callbackMode: (AUDIOSTREAM_CALLBACK_MODE)  callbackMode 

Enable/disable the audio stream callback.

Parameters
sessionIdThe session ID of call.
enableSet to true to enable audio stream callback, or false to stop the callback.
callbackModeThe audio stream callback mode.
TypeDescription
AUDIOSTREAM_LOCAL_PER_CHANNELCallback the audio stream from microphone for one channel based on the given sessionId.
AUDIOSTREAM_REMOTE_PER_CHANNELCallback the received audio stream for one channel based on the given sessionId.
AUDIOSTREAM_BOTHCallback both local and remote audio stream 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
onAudioRawCallback event will be triggered if the callback is enabled.

◆ enableVideoStreamCallback:callbackMode:()

- (int) enableVideoStreamCallback: (long)  sessionId
callbackMode: (VIDEOSTREAM_CALLBACK_MODE)  callbackMode 

Enable/disable the video stream callback.

Parameters
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 of 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.