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

Functions

Int32 PortSIP.PortSIPLib.addAudioCodec (AUDIOCODEC_TYPE codecType)
 Enable an audio codec. It will be appears in SDP. More...
 
Int32 PortSIP.PortSIPLib.addVideoCodec (VIDEOCODEC_TYPE codecType)
 Enable a video codec. It will appear in SDP. More...
 
Boolean PortSIP.PortSIPLib.isAudioCodecEmpty ()
 Detect if enabled audio codecs is empty or not. More...
 
Boolean PortSIP.PortSIPLib.isVideoCodecEmpty ()
 Detect if enabled video codecs is empty or not. More...
 
Int32 PortSIP.PortSIPLib.setAudioCodecPayloadType (AUDIOCODEC_TYPE codecType, Int32 payloadType)
 Set the RTP payload type for dynamic audio codec. More...
 
Int32 PortSIP.PortSIPLib.setVideoCodecPayloadType (VIDEOCODEC_TYPE codecType, Int32 payloadType)
 Set the RTP payload type for dynamic Video codec. More...
 
void PortSIP.PortSIPLib.clearAudioCodec ()
 Remove all enabled audio codecs.
 
void PortSIP.PortSIPLib.clearVideoCodec ()
 Remove all enabled video codecs.
 
Int32 PortSIP.PortSIPLib.setAudioCodecParameter (AUDIOCODEC_TYPE codecType, String parameter)
 Set the codec parameter for audio codec. More...
 
Int32 PortSIP.PortSIPLib.setVideoCodecParameter (VIDEOCODEC_TYPE codecType, String parameter)
 Set the codec parameter for video codec. More...
 

Detailed Description

Function Documentation

◆ addAudioCodec()

Int32 PortSIP.PortSIPLib.addAudioCodec ( AUDIOCODEC_TYPE  codecType)

Enable an audio codec. It will be appears 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()

Int32 PortSIP.PortSIPLib.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()

Boolean PortSIP.PortSIPLib.isAudioCodecEmpty ( )

Detect if enabled audio codecs is empty or not.

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

◆ isVideoCodecEmpty()

Boolean PortSIP.PortSIPLib.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()

Int32 PortSIP.PortSIPLib.setAudioCodecPayloadType ( AUDIOCODEC_TYPE  codecType,
Int32  payloadType 
)

Set the RTP payload type for dynamic audio codec.

Parameters
codecTypeAudio codec type, which is 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 value a specific error code.

◆ setVideoCodecPayloadType()

Int32 PortSIP.PortSIPLib.setVideoCodecPayloadType ( VIDEOCODEC_TYPE  codecType,
Int32  payloadType 
)

Set the RTP payload type for dynamic Video codec.

Parameters
codecTypeVideo codec type, which is 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()

Int32 PortSIP.PortSIPLib.setAudioCodecParameter ( AUDIOCODEC_TYPE  codecType,
String  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:
setAudioCodecParameter(AUDIOCODEC_AMR, "mode-set=0; octet-align=1; robust-sorting=0");

◆ setVideoCodecParameter()

Int32 PortSIP.PortSIPLib.setVideoCodecParameter ( VIDEOCODEC_TYPE  codecType,
String  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:
setVideoCodecParameter(VIDEO_CODEC_H264, "profile-level-id=420033; packetization-mode=0");