]> sjero.net Git - linphone/commitdiff
Moved Android video capture class.
authorGuillaume Beraudo <guillaume.beraudo@linphone.org>
Wed, 23 Feb 2011 15:10:22 +0000 (16:10 +0100)
committerGuillaume Beraudo <guillaume.beraudo@linphone.org>
Wed, 23 Feb 2011 15:10:22 +0000 (16:10 +0100)
coreapi/linphonecore.c
coreapi/linphonecore.h
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCore.java
java/common/org/linphone/core/LinphoneCoreFactory.java
mediastreamer2
oRTP

index ef145c2fd35af1d304afcc5129104ed87b810f73..6af2fbfc9d5d5a1140c5ac663b92460a2036a2d8 100644 (file)
@@ -3532,12 +3532,19 @@ static MSFilter *get_dtmf_gen(LinphoneCore *lc){
 /**
  * Plays a dtmf to the local user.
 **/
-void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){
+void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker){
        MSFilter *f=get_dtmf_gen(lc);
        if (f==NULL){
                ms_error("No dtmf generator at this time !");
                return;
        }
+
+       if (!speaker && !linphone_core_in_call(lc)) {
+               // If not in call and user doesn't want sound to go out from speaker
+               // TODO: update dtmf generator to only output on output stream if speaker is false.
+               return;
+       }
+
        if (duration_ms>0)
                ms_filter_call_method(f, MS_DTMF_GEN_PLAY, &dtmf);
        else ms_filter_call_method(f, MS_DTMF_GEN_START, &dtmf);
index 0b9823f3c0eeeafb15deb97bbbf11ef3800203a8..a2f86f429fe4380193c4dff76c049d12ae79c5e8 100644 (file)
@@ -897,7 +897,7 @@ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
 void linphone_core_set_play_file(LinphoneCore *lc, const char *file);
 void linphone_core_set_record_file(LinphoneCore *lc, const char *file);
 
-void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms);
+void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker);
 void linphone_core_stop_dtmf(LinphoneCore *lc);
 
 int linphone_core_get_current_call_duration(const LinphoneCore *lc);
index fbd8f01eab4f534d297958f7be18d312b7f46a13..7eca2c823ae3c6ae617b6a1bd21be8d995374596 100644 (file)
@@ -480,8 +480,9 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_playDtmf(   JNIEnv*  env
                ,jobject  thiz
                ,jlong lc
                ,jchar dtmf
-               ,jint duration) {
-       linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration);
+               ,jint duration
+               ,jboolean speaker) {
+       linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration,speaker);
 }
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_stopDtmf(      JNIEnv*  env
                ,jobject  thiz
index 3e33bdce6ea6cab1b05a77d4449807b647f2da44..2d5daff6d560744cfac767d3483ecd0cd59336c6 100644 (file)
@@ -350,8 +350,9 @@ public interface LinphoneCore {
         * Initiate a dtmf signal to the speqker if not in call
         * @param number
         * @param duration in ms , -1 for unlimited
+        * @param speaker play dtmf on speaker
         */
-       public void playDtmf(char number,int duration);
+       public void playDtmf(char number,int duration, boolean speaker);
        /**
         * stop current dtmf
         */
index a4137ec913983188b1af5ba310bc5a9ff139a9c3..5cbd5ac5eb96016d7514352caa427e7ee59d4824 100644 (file)
@@ -36,14 +36,14 @@ abstract public class LinphoneCoreFactory {
                factoryName = className;
        }
        
-       public static LinphoneCoreFactory instance() {
+       public static final synchronized LinphoneCoreFactory instance() {
                try {
                if (theLinphoneCoreFactory == null) {
                        Class lFactoryClass = Class.forName(factoryName);
                        theLinphoneCoreFactory = (LinphoneCoreFactory) lFactoryClass.newInstance();
                }
                } catch (Exception e) {
-                       System.err.println("cannot instanciate factory ["+factoryName+"]");
+                       System.err.println("Cannot instanciate factory ["+factoryName+"]");
                }
                return theLinphoneCoreFactory;
        }
index dce5ac7d4dc8e298cdedd5dcef55c60d7485206e..9412db625a9f00e6de4c612dbc69ab1f98822d63 160000 (submodule)
@@ -1 +1 @@
-Subproject commit dce5ac7d4dc8e298cdedd5dcef55c60d7485206e
+Subproject commit 9412db625a9f00e6de4c612dbc69ab1f98822d63
diff --git a/oRTP b/oRTP
index c8b487f32fe225f8b1961754db9140eb282a0d28..4e61d05db02318f44768458a69f29faec75c94c8 160000 (submodule)
--- a/oRTP
+++ b/oRTP
@@ -1 +1 @@
-Subproject commit c8b487f32fe225f8b1961754db9140eb282a0d28
+Subproject commit 4e61d05db02318f44768458a69f29faec75c94c8