]> sjero.net Git - linphone/commitdiff
add conference recording API.
authorSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Feb 2013 20:28:31 +0000 (21:28 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Feb 2013 20:28:31 +0000 (21:28 +0100)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCore.java
java/impl/org/linphone/core/LinphoneCoreImpl.java

index 9c8697f6aad5f3082ff550eb24fe97e4be89d758..57ab7c4ca1a5b68f506b817761837e5c3a264f4b 100644 (file)
@@ -2060,9 +2060,11 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_leaveConference(JNIEnv *
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addAllToConference(JNIEnv *env,jobject thiz,jlong pCore) {
        linphone_core_add_all_to_conference((LinphoneCore *) pCore);
 }
+
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addToConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
        linphone_core_add_to_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
 }
+
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeFromConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
        linphone_core_remove_from_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
 }
@@ -2073,6 +2075,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateConference(JNIE
 extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv *env,jobject thiz,jlong pCore) {
        return (jint)linphone_core_get_conference_size((LinphoneCore *) pCore);
 }
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_startConferenceRecording(JNIEnv *env,jobject thiz,jlong pCore, jstring jpath){
+       int err=-1;
+       if (jpath){
+               const char *path=env->GetStringUTFChars(jpath, NULL);
+               err=linphone_core_start_conference_recording((LinphoneCore*)pCore,path);
+               env->ReleaseStringUTFChars(jpath,path);
+       }
+       return err;
+}
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_stopConferenceRecording(JNIEnv *env,jobject thiz,jlong pCore){
+       int err=linphone_core_stop_conference_recording((LinphoneCore*)pCore);
+       return err;
+}
+
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateAllCalls(JNIEnv *env,jobject thiz,jlong pCore) {
        linphone_core_terminate_all_calls((LinphoneCore *) pCore);
 }
index 3a6cf2a760e1d6c304161b638dc0d3ed8a8cd88c..87b5de094aacac1c4f86279c5e93f79d0daef637 100644 (file)
@@ -761,25 +761,63 @@ public interface LinphoneCore {
         */
        void adjustSoftwareVolume(int i);
        
+       /**
+        * Pause a call.
+       **/
        boolean pauseCall(LinphoneCall call);
+       /**
+        * Resume a call.
+       **/
        boolean resumeCall(LinphoneCall call);
        boolean pauseAllCalls();
        
        void setZrtpSecretsCache(String file);
        void enableEchoLimiter(boolean val);
 
+       /**
+        * Indicates whether the local user is part of the conference.
+       **/
        boolean isInConference();
+       /**
+        * Connect the local user to the conference.
+       **/
        boolean enterConference();
+       /**
+        * Disconnect the local user from the conference.
+       **/
        void leaveConference();
 
+       /**
+        * Add an established call to the conference. The LinphoneCore is able to manage one client based conference.
+       **/
        void addToConference(LinphoneCall call);
-       void addAllToConference();
+       /**
+        * Remove an established call from the conference.
+       **/
        void removeFromConference(LinphoneCall call);
-
+       void addAllToConference();
+       
+       /**
+        * Terminate the conference, all users are disconnected.
+       **/
        void terminateConference();
        int getConferenceSize();
+
+       /**
+        * Request recording of the conference into a supplied file path.
+        * The format is wav.
+       **/
+       void startConferenceRecording(String path);
        
+       /**
+        * Stop recording of the conference.
+       **/
+       void stopConferenceRecording();
+
        void terminateAllCalls();
+       /**
+        * Returns all calls.
+       **/
        LinphoneCall[] getCalls();
        int getCallsNb();
 
index 7b596f7e2f4788ecb4d57fd9ff73f4b510e0b020..5a52f7559a7408718f2a898fbb33ae3d8afeae1e 100644 (file)
@@ -897,4 +897,15 @@ class LinphoneCoreImpl implements LinphoneCore {
        public String getUpnpExternalIpaddress() {
                return getUpnpExternalIpaddress(nativePtr);
        }
+       private native int startConferenceRecording(long nativePtr, String path);
+       @Override
+       public void startConferenceRecording(String path) {
+               startConferenceRecording(nativePtr,path);
+       }
+       
+       private native int stopConferenceRecording(long nativePtr);
+       @Override
+       public void stopConferenceRecording() {
+               stopConferenceRecording(nativePtr);
+       }
 }