![]() |
PortSIP VoIP SDK Manual for Android
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 | |
void | com.portsip.OnPortSIPEvent.onReceivedRTPPacket (long sessionId, boolean isAudio, byte[] RTPPacket, int packetSize) |
void | com.portsip.OnPortSIPEvent.onSendingRTPPacket (long sessionId, boolean isAudio, byte[] RTPPacket, int packetSize) |
void | com.portsip.OnPortSIPEvent.onAudioRawCallback (long sessionId, int enum_audioCallbackMode, byte[] data, int dataLength, int samplingFreqHz) |
void | com.portsip.OnPortSIPEvent.onVideoRawCallback (long sessionId, int enum_videoCallbackMode, int width, int height, byte[] data, int dataLength) |
void com.portsip.OnPortSIPEvent.onReceivedRTPPacket | ( | long | sessionId, |
boolean | isAudio, | ||
byte [] | RTPPacket, | ||
int | packetSize | ||
) |
If setRTPCallback function is called to enable the RTP callback, this event will be triggered once receiving a RTP packet.
sessionId | The session ID of the call. |
isAudio | If the received RTP packet is of audio, this parameter returns true; otherwise false. |
RTPPacket | The memory of whole RTP packet. |
packetSize | The size of received RTP Packet. Remarks |
Don't call any SDK API functions in this event directly. If you want to call the API functions or other code which is time-consuming, you should post a message to another thread and execute SDK API functions or other code in another thread.
void com.portsip.OnPortSIPEvent.onSendingRTPPacket | ( | long | sessionId, |
boolean | isAudio, | ||
byte [] | RTPPacket, | ||
int | packetSize | ||
) |
If setRTPCallback function is called to enable the RTP callback, this event will be triggered once sending a RTP packet.
sessionId | The session ID of the call. |
isAudio | If the received RTP packet is of audio, this parameter returns true; otherwise false. |
RTPPacket | The memory of whole RTP packet. |
packetSize | The size of received RTP Packet. Remarks |
Don't call any SDK API functions in this event directly. If you want to call the API functions or other code which is time-consuming, you should post a message to another thread and execute SDK API functions or other code in another thread.
void com.portsip.OnPortSIPEvent.onAudioRawCallback | ( | long | sessionId, |
int | enum_audioCallbackMode, | ||
byte [] | data, | ||
int | dataLength, | ||
int | samplingFreqHz | ||
) |
This event will be triggered once receiving the audio packets if called enableAudioStreamCallback function.
sessionId | The session ID of the call. |
enum_audioCallbackMode | The type passed in enableAudioStreamCallback function. Below types allowed: ENUM_AUDIOSTREAM_NONE, ENUM_AUDIOSTREAM_LOCAL_MIX, ENUM_AUDIOSTREAM_LOCAL_PER_CHANNEL, ENUM_AUDIOSTREAM_REMOTE_MIX, ENUM_AUDIOSTREAM_REMOTE_PER_CHANNEL. |
data | The memory of audio stream. It's in PCM format. |
dataLength | The data size. |
samplingFreqHz | The audio stream sample in HZ. For example, 8000 or 16000. Remarks |
Don't call any SDK API functions in this event directly. If you want to call the API functions or other code which is time-consuming, you should post a message to another thread and execute SDK API functions or other code in another thread.
void com.portsip.OnPortSIPEvent.onVideoRawCallback | ( | long | sessionId, |
int | enum_videoCallbackMode, | ||
int | width, | ||
int | height, | ||
byte [] | data, | ||
int | dataLength | ||
) |
This event will be triggered once receiving the video packets if enableVideoStreamCallback function is called.
sessionId | The session ID of the call. |
enum_videoCallbackMode | The type which is passed in enableVideoStreamCallback function. Below types allowed: ENUM_VIDEOSTREAM_NONE, ENUM_VIDEOSTREAM_LOCAL, ENUM_VIDEOSTREAM_REMOTE, ENUM_VIDEOSTREAM_BOTH. |
width | The width of video image. |
height | The height of video image. |
data | The memory of video stream. It's in YUV420 format, YV12. |
dataLength | The data size. |