mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
add missing wrappers to the PayloadType object
This commit is contained in:
parent
8b674d05e3
commit
866bc5c4c0
3 changed files with 103 additions and 1 deletions
|
|
@ -3316,3 +3316,52 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_PresenceNoteImpl_getLang(JNIEnv
|
|||
const char *clang = linphone_presence_note_get_lang(note);
|
||||
return clang ? env->NewStringUTF(clang) : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_PayloadTypeImpl
|
||||
* Method: setRecvFmtp
|
||||
* Signature: (JLjava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_PayloadTypeImpl_setRecvFmtp(JNIEnv *env, jobject jobj, jlong ptr, jstring jfmtp){
|
||||
PayloadType *pt=(PayloadType *)ptr;
|
||||
const char *fmtp=jfmtp ? env->GetStringUTFChars(jfmtp,NULL) : NULL;
|
||||
payload_type_set_recv_fmtp(pt,fmtp);
|
||||
if (fmtp) env->ReleaseStringUTFChars(jfmtp,fmtp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_PayloadTypeImpl
|
||||
* Method: getRecvFmtp
|
||||
* Signature: (J)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_org_linphone_core_PayloadTypeImpl_getRecvFmtp(JNIEnv *env, jobject jobj, jlong ptr){
|
||||
PayloadType *pt=(PayloadType *)ptr;
|
||||
const char *fmtp=pt->recv_fmtp;
|
||||
return fmtp ? env->NewStringUTF(fmtp) : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_PayloadTypeImpl
|
||||
* Method: setSendFmtp
|
||||
* Signature: (JLjava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_PayloadTypeImpl_setSendFmtp(JNIEnv *env, jobject jobj, jlong ptr , jstring jfmtp){
|
||||
PayloadType *pt=(PayloadType *)ptr;
|
||||
const char *fmtp=jfmtp ? env->GetStringUTFChars(jfmtp,NULL) : NULL;
|
||||
payload_type_set_send_fmtp(pt,fmtp);
|
||||
if (fmtp) env->ReleaseStringUTFChars(jfmtp,fmtp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_PayloadTypeImpl
|
||||
* Method: getSendFmtp
|
||||
* Signature: (J)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_org_linphone_core_PayloadTypeImpl_getSendFmtp(JNIEnv *env, jobject jobj, jlong ptr){
|
||||
PayloadType *pt=(PayloadType *)ptr;
|
||||
const char *fmtp=pt->send_fmtp;
|
||||
return fmtp ? env->NewStringUTF(fmtp) : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
package org.linphone.core;
|
||||
|
||||
public interface PayloadType {
|
||||
|
||||
/**
|
||||
* Obtain the registered mime-type (actually submime) of the PayloadType. For example: "H264", "speex"...
|
||||
* @return the (sub) mime type.
|
||||
*/
|
||||
String getMime();
|
||||
|
||||
/**
|
||||
* Return the RTP clockrate. It is usually the same as the audio sampling rate, and 90000 for video payload types.
|
||||
* @return
|
||||
*/
|
||||
int getRate();
|
||||
|
||||
/**
|
||||
* Set format parameter string wished for incoming stream. It is advertised in SDP.
|
||||
* @param fmtp the fmtp string, like "octet-align=1;mode-set=4,5,6,7"
|
||||
*/
|
||||
void setRecvFmtp(String fmtp);
|
||||
|
||||
/**
|
||||
* Return the format parameters wished for incoming stream.
|
||||
* @return the format parameter string.
|
||||
*/
|
||||
String getRecvFmtp();
|
||||
|
||||
/**
|
||||
* Set the format parameter effective for the outgoing stream (unusual).
|
||||
* @param fmtp
|
||||
*/
|
||||
void setSendFmtp(String fmtp);
|
||||
|
||||
/**
|
||||
* Return the format parameter effective for the outgoing stream.
|
||||
* @return
|
||||
*/
|
||||
String getSendFmtp();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,26 @@ class PayloadTypeImpl implements PayloadType {
|
|||
public String toString() {
|
||||
return toString(nativePtr);
|
||||
}
|
||||
|
||||
private native void setRecvFmtp(long ptr, String fmtp);
|
||||
@Override
|
||||
public void setRecvFmtp(String fmtp) {
|
||||
setRecvFmtp(nativePtr,fmtp);
|
||||
}
|
||||
private native String getRecvFmtp(long ptr);
|
||||
@Override
|
||||
public String getRecvFmtp() {
|
||||
return getRecvFmtp(nativePtr);
|
||||
}
|
||||
|
||||
private native void setSendFmtp(long ptr, String fmtp);
|
||||
@Override
|
||||
public void setSendFmtp(String fmtp) {
|
||||
setSendFmtp(nativePtr,fmtp);
|
||||
}
|
||||
private native String getSendFmtp(long ptr);
|
||||
@Override
|
||||
public String getSendFmtp() {
|
||||
return getSendFmtp(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue