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
Audio and video codecs functions

Functions

(int) - PortSIPSDK::addAudioCodec:
 Enable an audio codec. It will appear in SDP. More...
 
(int) - PortSIPSDK::addVideoCodec:
 Enable a video codec. It will appear in SDP. More...
 
(BOOL) - PortSIPSDK::isAudioCodecEmpty
 Detect if the enabled audio codecs is empty. More...
 
(BOOL) - PortSIPSDK::isVideoCodecEmpty
 Detect if enabled video codecs is empty or not. More...
 
(int) - PortSIPSDK::setAudioCodecPayloadType:payloadType:
 Set the RTP payload type for dynamic audio codec. More...
 
(int) - PortSIPSDK::setVideoCodecPayloadType:payloadType:
 Set the RTP payload type for dynamic Video codec. More...
 
(void) - PortSIPSDK::clearAudioCodec
 Remove all enabled audio codecs.
 
(void) - PortSIPSDK::clearVideoCodec
 Remove all enabled video codecs.
 
(int) - PortSIPSDK::setAudioCodecParameter:parameter:
 Set the codec parameter for audio codec. More...
 
(int) - PortSIPSDK::setVideoCodecParameter:parameter:
 Set the codec parameter for video codec. More...
 

Detailed Description

Function Documentation

◆ addAudioCodec:()

- (int) addAudioCodec: (AUDIOCODEC_TYPE)  codecType

Enable an audio codec. It will appear in SDP.

Parameters
codecTypeAudio codec type.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ addVideoCodec:()

- (int) addVideoCodec: (VIDEOCODEC_TYPE)  codecType

Enable a video codec. It will appear in SDP.

Parameters
codecTypeVideo codec type.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ isAudioCodecEmpty()

- (BOOL) isAudioCodecEmpty

Detect if the enabled audio codecs is empty.

Returns
If no audio codec is enabled, it will return value true, otherwise false.

◆ isVideoCodecEmpty()

- (BOOL) isVideoCodecEmpty

Detect if enabled video codecs is empty or not.

Returns
If no video codec is enabled, it will return value true, otherwise false.

◆ setAudioCodecPayloadType:payloadType:()

- (int) setAudioCodecPayloadType: (AUDIOCODEC_TYPE)  codecType
payloadType: (int)  payloadType 

Set the RTP payload type for dynamic audio codec.

Parameters
codecTypeAudio codec type defined in the PortSIPTypes file.
payloadTypeThe new RTP payload type that you want to set.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setVideoCodecPayloadType:payloadType:()

- (int) setVideoCodecPayloadType: (VIDEOCODEC_TYPE)  codecType
payloadType: (int)  payloadType 

Set the RTP payload type for dynamic Video codec.

Parameters
codecTypeVideo codec type defined in the PortSIPTypes file.
payloadTypeThe new RTP payload type that you want to set.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setAudioCodecParameter:parameter:()

- (int) setAudioCodecParameter: (AUDIOCODEC_TYPE)  codecType
parameter: (NSString *)  parameter 

Set the codec parameter for audio codec.

Parameters
codecTypeAudio codec type defined in the PortSIPTypes file.
parameterThe parameter in string format.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
Example:
[myVoIPsdk setAudioCodecParameter:AUDIOCODEC_AMR parameter:"mode-set=0; octet-align=1; robust-sorting=0"];

◆ setVideoCodecParameter:parameter:()

- (int) setVideoCodecParameter: (VIDEOCODEC_TYPE)  codecType
parameter: (NSString *)  parameter 

Set the codec parameter for video codec.

Parameters
codecTypeVideo codec type defined in the PortSIPTypes file.
parameterThe parameter in string format.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return value a specific error code.
Remarks
Example:
[myVoIPsdk setVideoCodecParameter:VIDEOCODEC_H264 parameter:"profile-level-id=420033; packetization-mode=0"];