Update media streamer2 : text stream, ring stream, audio stream.

Adding declaration of void ms_factory_set_mtu  in factory.h.
Adding a getter linphone_core_get_factory(void *lc) in linphonecore.h.
This commit is contained in:
Sandrine Avakian 2016-01-19 13:58:21 +01:00
parent 4dfdc930c3
commit 48b10c1724
5 changed files with 12 additions and 7 deletions

View file

@ -405,7 +405,7 @@ static void start_remote_ring(LinphoneCore *lc, LinphoneCall *call) {
if (call->audiostream)
audio_stream_unprepare_sound(call->audiostream);
if( lc->sound_conf.remote_ring ){
lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,ringcard);
lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,ringcard,lc->factory);
}
}
}

View file

@ -4788,6 +4788,9 @@ int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCb
return err;
}
MSFactory *linphone_core_get_factory(void *lc){
return ((LinphoneCore*)lc)->factory;
}
/**
* Sets the path to a wav file used for ringing back.
*
@ -5231,6 +5234,7 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val){
video_preview_set_native_window_id(lc->previewstream,lc->preview_window_id);
video_preview_set_fps(lc->previewstream,linphone_core_get_preferred_framerate(lc));
video_preview_start(lc->previewstream,lc->video_conf.device);
lc->previewstream->ms.factory = lc->factory;
}
}else{
if (lc->previewstream!=NULL){
@ -5917,7 +5921,7 @@ static MSFilter *get_audio_resource(LinphoneCore *lc, LinphoneAudioResourceType
if (ringcard == NULL)
return NULL;
ringstream=lc->ringstream=ring_start(NULL,0,ringcard);
ringstream=lc->ringstream=ring_start(NULL,0,ringcard, lc->factory);
ms_filter_call_method(lc->ringstream->gendtmf,MS_DTMF_GEN_SET_DEFAULT_AMPLITUDE,&amp);
lc->dmfs_playing_start_time = ms_get_cur_time_ms()/1000;
}else{
@ -6081,9 +6085,9 @@ void linphone_core_set_mtu(LinphoneCore *lc, int mtu){
ms_error("MTU too small !");
mtu=500;
}
ms_set_mtu(mtu);
ms_message("MTU is supposed to be %i, rtp payload max size will be %i",mtu, ms_get_payload_max_size());
}else ms_set_mtu(0);//use mediastreamer2 default value
ms_factory_set_mtu(lc->factory, mtu);
ms_message("MTU is supposed to be %i, rtp payload max size will be %i",mtu, ms_factory_get_payload_max_size(lc->factory));
}else ms_factory_set_mtu(lc->factory, 0);//use mediastreamer2 default value
}
void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneCoreWaitingCallback cb, void *user_context){

View file

@ -3241,6 +3241,7 @@ LINPHONE_PUBLIC void linphone_core_set_ring_during_incoming_early_media(Linphone
LINPHONE_PUBLIC bool_t linphone_core_get_ring_during_incoming_early_media(const LinphoneCore *lc);
LINPHONE_PUBLIC int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata);
LINPHONE_PUBLIC MSFactory* linphone_core_get_factory(void* lc);
LINPHONE_PUBLIC int linphone_core_play_local(LinphoneCore *lc, const char *audiofile);
LINPHONE_PUBLIC void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val);
LINPHONE_PUBLIC bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc);

View file

@ -85,7 +85,7 @@ int linphone_ringtoneplayer_start_with_cb(LinphoneRingtonePlayer* rp, MSSndCard*
ms_message("Starting local ringtone...");
rp->end_of_ringtone = end_of_ringtone;
rp->end_of_ringtone_ud = user_data;
rp->ringstream=ring_start_with_cb(ringtone,loop_pause_ms,card,notify_end_of_ringtone,rp);
rp->ringstream=ring_start_with_cb(ringtone,loop_pause_ms,card,notify_end_of_ringtone,rp,linphone_core_get_factory(user_data));
return rp->ringstream != NULL ? 0 : 1;
}
return 3;

@ -1 +1 @@
Subproject commit 8fc4323f8166b7432bdbf409fdeb426e08cdff32
Subproject commit 68ec6e6113d0bdada57fdfac462e0dd8ebc6a53e