forked from mirrors/linphone-iphone
wrap DSCP API for java
This commit is contained in:
parent
1f9b0812a0
commit
3a3a5e478d
3 changed files with 99 additions and 0 deletions
|
|
@ -2143,6 +2143,14 @@ extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getDuration(JNIEnv* env
|
|||
return (jint)linphone_call_get_duration((LinphoneCall *) ptr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setSipDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
|
||||
linphone_core_set_sip_dscp((LinphoneCore*)ptr,dscp);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSipDscp(JNIEnv* env,jobject thiz,jlong ptr){
|
||||
return linphone_core_get_sip_dscp((LinphoneCore*)ptr);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getSignalingTransportPort(JNIEnv* env,jobject thiz,jlong ptr, jint code) {
|
||||
LCSipTransports tr;
|
||||
linphone_core_get_sip_transports((LinphoneCore *) ptr, &tr);
|
||||
|
|
@ -2447,6 +2455,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoPortRange(JNIEnv
|
|||
linphone_core_set_video_port_range((LinphoneCore *)lc, min_port, max_port);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setAudioDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
|
||||
linphone_core_set_audio_dscp((LinphoneCore*)ptr,dscp);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getAudioDscp(JNIEnv* env,jobject thiz,jlong ptr){
|
||||
return linphone_core_get_audio_dscp((LinphoneCore*)ptr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoDscp(JNIEnv* env,jobject thiz,jlong ptr, jint dscp){
|
||||
linphone_core_set_video_dscp((LinphoneCore*)ptr,dscp);
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getVideoDscp(JNIEnv* env,jobject thiz,jlong ptr){
|
||||
return linphone_core_get_video_dscp((LinphoneCore*)ptr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setIncomingTimeout(JNIEnv *env, jobject thiz, jlong lc, jint timeout) {
|
||||
linphone_core_set_inc_timeout((LinphoneCore *)lc, timeout);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -637,6 +637,20 @@ public interface LinphoneCore {
|
|||
* @return transports used for signaling (TCP, UDP, TLS)
|
||||
*/
|
||||
Transports getSignalingTransportPorts();
|
||||
|
||||
/**
|
||||
* Assign a dscp value for the SIP socket.
|
||||
* DSCP is an IP packet field used to indicate the type of routing service to routers.
|
||||
* @param dscp
|
||||
*/
|
||||
void setSipDscp(int dscp);
|
||||
|
||||
/**
|
||||
* Get DSCP used for SIP socket.
|
||||
* @return the DSCP value used for the SIP socket.
|
||||
*/
|
||||
int getSipDscp();
|
||||
|
||||
/**
|
||||
* Activates or deactivates the speaker.
|
||||
* @param value
|
||||
|
|
@ -1146,6 +1160,19 @@ public interface LinphoneCore {
|
|||
*/
|
||||
void setAudioPortRange(int minPort, int maxPort);
|
||||
|
||||
/**
|
||||
* Assign a DSCP value to the audio RTP sockets.
|
||||
* @param dscp the DSCP value.
|
||||
* DSCP is an IP header field used to indicate a type of service to routers.
|
||||
*/
|
||||
void setAudioDscp(int dscp);
|
||||
|
||||
/**
|
||||
* Return DSCP value used for the audio RTP sockets.
|
||||
* @return the DSCP value used for the audio RTP sockets.
|
||||
*/
|
||||
int getAudioDscp();
|
||||
|
||||
/**
|
||||
* Sets the UDP port used for video streaming.
|
||||
**/
|
||||
|
|
@ -1156,6 +1183,19 @@ public interface LinphoneCore {
|
|||
*/
|
||||
void setVideoPortRange(int minPort, int maxPort);
|
||||
|
||||
/**
|
||||
* Assign a DSCP value to the video RTP sockets.
|
||||
* @param dscp the DSCP value.
|
||||
* DSCP is an IP header field used to indicate a type of service to routers.
|
||||
*/
|
||||
void setVideoDscp(int dscp);
|
||||
|
||||
/**
|
||||
* Return DSCP value used for the video RTP sockets.
|
||||
* @return the DSCP value used for the video RTP sockets.
|
||||
*/
|
||||
int getVideoDscp();
|
||||
|
||||
/**
|
||||
* Set the incoming call timeout in seconds.
|
||||
* If an incoming call isn't answered for this timeout period, it is
|
||||
|
|
|
|||
|
|
@ -913,4 +913,39 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public PayloadType findPayloadType(String mime) {
|
||||
return findPayloadType(mime, FIND_PAYLOAD_IGNORE_RATE);
|
||||
}
|
||||
|
||||
private native void setSipDscp(long nativePtr, int dscp);
|
||||
@Override
|
||||
public void setSipDscp(int dscp) {
|
||||
setSipDscp(nativePtr,dscp);
|
||||
}
|
||||
|
||||
private native int getSipDscp(long nativePtr);
|
||||
@Override
|
||||
public int getSipDscp() {
|
||||
return getSipDscp(nativePtr);
|
||||
}
|
||||
private native void setAudioDscp(long nativePtr, int dscp);
|
||||
@Override
|
||||
public void setAudioDscp(int dscp) {
|
||||
setAudioDscp(nativePtr, dscp);
|
||||
}
|
||||
|
||||
private native int getAudioDscp(long nativePtr);
|
||||
@Override
|
||||
public int getAudioDscp() {
|
||||
return getAudioDscp(nativePtr);
|
||||
}
|
||||
|
||||
private native void setVideoDscp(long nativePtr, int dscp);
|
||||
@Override
|
||||
public void setVideoDscp(int dscp) {
|
||||
setVideoDscp(nativePtr,dscp);
|
||||
}
|
||||
|
||||
private native int getVideoDscp(long nativePtr);
|
||||
@Override
|
||||
public int getVideoDscp() {
|
||||
return getVideoDscp(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue