Moved Android video capture class.

This commit is contained in:
Guillaume Beraudo 2011-02-23 16:10:22 +01:00
parent 703e455e34
commit c0785a9ca6
7 changed files with 18 additions and 9 deletions

View 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);

View 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);

View 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

View 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
*/

View 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;
}

@ -1 +1 @@
Subproject commit dce5ac7d4dc8e298cdedd5dcef55c60d7485206e
Subproject commit 9412db625a9f00e6de4c612dbc69ab1f98822d63

2
oRTP

@ -1 +1 @@
Subproject commit c8b487f32fe225f8b1961754db9140eb282a0d28
Subproject commit 4e61d05db02318f44768458a69f29faec75c94c8