diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 8bb6c368a..4b55f474e 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -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->factory); + lc->ringstream=ring_start(lc->factory, lc->sound_conf.remote_ring,2000,ringcard); } } } diff --git a/coreapi/conference.cc b/coreapi/conference.cc index 90f5117e6..50dd57c2d 100644 --- a/coreapi/conference.cc +++ b/coreapi/conference.cc @@ -317,7 +317,7 @@ RtpProfile *LocalConference::sMakeDummyProfile(int samplerate){ void LocalConference::addLocalEndpoint() { /*create a dummy audiostream in order to extract the local part of it */ /* network address and ports have no meaning and are not used here. */ - AudioStream *st=audio_stream_new(65000,65001,FALSE,m_core->factory); + AudioStream *st=audio_stream_new(m_core->factory, 65000,65001,FALSE); MSSndCard *playcard=m_core->sound_conf.lsd_card ? m_core->sound_conf.lsd_card : m_core->sound_conf.play_sndcard; MSSndCard *captcard=m_core->sound_conf.capt_sndcard; diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 2386136d2..ba55fd1c2 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -50,7 +50,7 @@ void linphone_call_handle_stream_events(LinphoneCall *call, int stream_index); MSWebCam *get_nowebcam_device(MSFactory* f){ #ifdef VIDEO_ENABLED - return ms_web_cam_manager_get_cam(ms_factory_get_wbc_manager(f),"StaticImage: Static picture"); + return ms_web_cam_manager_get_cam(ms_factory_get_web_cam_manager(f),"StaticImage: Static picture"); #else return NULL; #endif @@ -2340,10 +2340,9 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ if (remotedesc) stream_desc = sal_media_description_find_best_stream(remotedesc, SalAudio); - call->audiostream=audiostream=audio_stream_new2(linphone_call_get_bind_ip_for_stream(call,call->main_audio_stream_index), + call->audiostream=audiostream=audio_stream_new2(lc->factory, linphone_call_get_bind_ip_for_stream(call,call->main_audio_stream_index), multicast_role == SalMulticastReceiver ? stream_desc->rtp_port : call->media_ports[call->main_audio_stream_index].rtp_port, - multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_audio_stream_index].rtcp_port, - call->core->factory); + multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_audio_stream_index].rtcp_port); if (multicast_role == SalMulticastReceiver) linphone_call_join_multicast_group(call, call->main_audio_stream_index, &audiostream->ms); rtp_session_enable_network_simulation(call->audiostream->ms.sessions.rtp_session, &lc->net_conf.netsim_params); @@ -2354,7 +2353,7 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ setup_dtls_params(call, &audiostream->ms); media_stream_reclaim_sessions(&audiostream->ms, &call->sessions[call->main_audio_stream_index]); }else{ - call->audiostream=audio_stream_new_with_sessions(&call->sessions[call->main_audio_stream_index], lc->factory); + call->audiostream=audio_stream_new_with_sessions(lc->factory, &call->sessions[call->main_audio_stream_index]); } audiostream=call->audiostream; @@ -2441,10 +2440,9 @@ void linphone_call_init_video_stream(LinphoneCall *call){ if (remotedesc) stream_desc = sal_media_description_find_best_stream(remotedesc, SalVideo); - call->videostream=video_stream_new2(linphone_call_get_bind_ip_for_stream(call,call->main_video_stream_index), + call->videostream=video_stream_new2(lc->factory, linphone_call_get_bind_ip_for_stream(call,call->main_video_stream_index), multicast_role == SalMulticastReceiver ? stream_desc->rtp_port : call->media_ports[call->main_video_stream_index].rtp_port, - multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_video_stream_index].rtcp_port, - lc->factory); + multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_video_stream_index].rtcp_port); if (multicast_role == SalMulticastReceiver) linphone_call_join_multicast_group(call, call->main_video_stream_index, &call->videostream->ms); rtp_session_enable_network_simulation(call->videostream->ms.sessions.rtp_session, &lc->net_conf.netsim_params); @@ -2455,7 +2453,7 @@ void linphone_call_init_video_stream(LinphoneCall *call){ setup_dtls_params(call, &call->videostream->ms); media_stream_reclaim_sessions(&call->videostream->ms, &call->sessions[call->main_video_stream_index]); }else{ - call->videostream=video_stream_new_with_sessions(&call->sessions[call->main_video_stream_index], lc->factory); + call->videostream=video_stream_new_with_sessions(lc->factory, &call->sessions[call->main_video_stream_index]); } if (call->media_ports[call->main_video_stream_index].rtp_port==-1){ @@ -2508,10 +2506,9 @@ void linphone_call_init_text_stream(LinphoneCall *call){ if (call->op) remotedesc = sal_call_get_remote_media_description(call->op); if (remotedesc) stream_desc = sal_media_description_find_best_stream(remotedesc, SalText); - call->textstream = textstream = text_stream_new2(linphone_call_get_bind_ip_for_stream(call,call->main_text_stream_index), + call->textstream = textstream = text_stream_new2(lc->factory, linphone_call_get_bind_ip_for_stream(call,call->main_text_stream_index), multicast_role == SalMulticastReceiver ? stream_desc->rtp_port : call->media_ports[call->main_text_stream_index].rtp_port, - multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_text_stream_index].rtcp_port, - call->core->factory); + multicast_role == SalMulticastReceiver ? 0 /*disabled for now*/ : call->media_ports[call->main_text_stream_index].rtcp_port); if (multicast_role == SalMulticastReceiver) linphone_call_join_multicast_group(call, call->main_text_stream_index, &textstream->ms); rtp_session_enable_network_simulation(call->textstream->ms.sessions.rtp_session, &lc->net_conf.netsim_params); @@ -2521,7 +2518,7 @@ void linphone_call_init_text_stream(LinphoneCall *call){ setup_dtls_params(call, &textstream->ms); media_stream_reclaim_sessions(&textstream->ms, &call->sessions[call->main_text_stream_index]); } else { - call->textstream = text_stream_new_with_sessions(&call->sessions[call->main_text_stream_index],call->core->factory); + call->textstream = text_stream_new_with_sessions(lc->factory, &call->sessions[call->main_text_stream_index]); } textstream = call->textstream; if (call->media_ports[call->main_text_stream_index].rtp_port == -1) { @@ -2946,7 +2943,7 @@ static RtpSession * create_audio_rtp_io_session(LinphoneCall *call) { if (pt != NULL) { call->rtp_io_audio_profile = rtp_profile_new("RTP IO audio profile"); rtp_profile_set_payload(call->rtp_io_audio_profile, ptnum, payload_type_clone(pt)); - rtp_session = ms_create_duplex_rtp_session(local_ip, local_port, -1); + rtp_session = ms_create_duplex_rtp_session(local_ip, local_port, -1, ms_factory_get_mtu(lc->factory)); rtp_session_set_profile(rtp_session, call->rtp_io_audio_profile); rtp_session_set_remote_addr_and_port(rtp_session, remote_ip, remote_port, -1); rtp_session_enable_rtcp(rtp_session, FALSE); @@ -3147,7 +3144,7 @@ static RtpSession * create_video_rtp_io_session(LinphoneCall *call) { if (pt != NULL) { call->rtp_io_video_profile = rtp_profile_new("RTP IO video profile"); rtp_profile_set_payload(call->rtp_io_video_profile, ptnum, payload_type_clone(pt)); - rtp_session = ms_create_duplex_rtp_session(local_ip, local_port, -1); + rtp_session = ms_create_duplex_rtp_session(local_ip, local_port, -1, ms_factory_get_mtu(lc->factory)); rtp_session_set_profile(rtp_session, call->rtp_io_video_profile); rtp_session_set_remote_addr_and_port(rtp_session, remote_ip, remote_port, -1); rtp_session_enable_rtcp(rtp_session, FALSE); @@ -3342,7 +3339,7 @@ static void linphone_call_start_text_stream(LinphoneCall *call) { if (is_multicast) rtp_session_set_multicast_ttl(call->textstream->ms.sessions.rtp_session,tstream->ttl); - text_stream_start(call->textstream, call->text_profile, rtp_addr, tstream->rtp_port, rtcp_addr, (linphone_core_rtcp_enabled(lc) && !is_multicast) ? (tstream->rtcp_port ? tstream->rtcp_port : tstream->rtp_port + 1) : 0, used_pt, call->core->factory); + text_stream_start(call->textstream, call->text_profile, rtp_addr, tstream->rtp_port, rtcp_addr, (linphone_core_rtcp_enabled(lc) && !is_multicast) ? (tstream->rtcp_port ? tstream->rtcp_port : tstream->rtp_port + 1) : 0, used_pt); ms_filter_add_notify_callback(call->textstream->rttsink, real_time_text_character_received, call, FALSE); ms_media_stream_sessions_set_encryption_mandatory(&call->textstream->ms.sessions,call->current_params->encryption_mandatory); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e0dd9e24b..95efd2a1d 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -779,7 +779,7 @@ static void build_sound_devices_table(LinphoneCore *lc){ const char **old; int ndev; int i; - const MSList *elem=ms_snd_card_manager_get_list(ms_factory_get_snd_manager(lc->factory)); + const MSList *elem=ms_snd_card_manager_get_list(ms_factory_get_snd_card_manager(lc->factory)); ndev=ms_list_size(elem); devices=ms_malloc((ndev+1)*sizeof(const char *)); for (i=0;elem!=NULL;elem=elem->next,i++){ @@ -824,13 +824,13 @@ static void sound_config_read(LinphoneCore *lc) char s=*i; *i='\0'; card=ms_alsa_card_new_custom(d+l,d+l); - ms_snd_card_manager_add_card(ms_factory_get_snd_manager(linphone_core_get_factory((void*)lc))),card); + ms_snd_card_manager_add_card(ms_factory_get_snd_card_manager(lc->factory),card); *i=s; l=i-d+1; } if(d[l]!='\0') { card=ms_alsa_card_new_custom(d+l,d+l); - ms_snd_card_manager_add_card(ms_factory_get_snd_manager(linphone_core_get_factory((void*)lc))),card); + ms_snd_card_manager_add_card(ms_factory_get_snd_card_manager(lc->factory),card); } free(d); } @@ -1295,7 +1295,7 @@ static void build_video_devices_table(LinphoneCore *lc){ if (lc->video_conf.cams) ms_free(lc->video_conf.cams); /* retrieve all video devices */ - elem=ms_web_cam_manager_get_list(ms_factory_get_wbc_manager(lc->factory)); + elem=ms_web_cam_manager_get_list(ms_factory_get_web_cam_manager(lc->factory)); ndev=ms_list_size(elem); devices=ms_malloc((ndev+1)*sizeof(const char *)); for (i=0;elem!=NULL;elem=elem->next,i++){ @@ -1686,7 +1686,7 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab ortp_init(); linphone_core_activate_log_serialization_if_needed(); - lc->factory = ms_factory_create(lc->factory); + lc->factory = ms_factory_new_with_voip(); linphone_core_register_default_codecs(lc); linphone_core_register_offer_answer_providers(lc); /* Get the mediastreamer2 event queue */ @@ -4458,7 +4458,7 @@ void linphone_core_set_rec_level(LinphoneCore *lc, int level) static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap, MSFactory *f){ MSSndCard *sndcard=NULL; if (devid!=NULL){ - sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_manager(f),devid); + sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_card_manager(f),devid); if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & cap)==0 ){ ms_warning("%s card does not have the %s capability, ignoring.", @@ -4469,15 +4469,15 @@ static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap, M } if (sndcard==NULL) { if ((cap & MS_SND_CARD_CAP_CAPTURE) && (cap & MS_SND_CARD_CAP_PLAYBACK)){ - sndcard=ms_snd_card_manager_get_default_card(ms_factory_get_snd_manager(f)); + sndcard=ms_snd_card_manager_get_default_card(ms_factory_get_snd_card_manager(f)); }else if (cap & MS_SND_CARD_CAP_CAPTURE){ - sndcard=ms_snd_card_manager_get_default_capture_card(ms_factory_get_snd_manager(f)); + sndcard=ms_snd_card_manager_get_default_capture_card(ms_factory_get_snd_card_manager(f)); } else if (cap & MS_SND_CARD_CAP_PLAYBACK){ - sndcard=ms_snd_card_manager_get_default_playback_card(ms_factory_get_snd_manager(f)); + sndcard=ms_snd_card_manager_get_default_playback_card(ms_factory_get_snd_card_manager(f)); } if (sndcard==NULL){/*looks like a bug! take the first one !*/ - const MSList *elem=ms_snd_card_manager_get_list(ms_factory_get_snd_manager(f)); + const MSList *elem=ms_snd_card_manager_get_list(ms_factory_get_snd_card_manager(f)); if (elem) sndcard=(MSSndCard*)elem->data; } } @@ -4494,7 +4494,7 @@ static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap, M **/ bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devid){ MSSndCard *sndcard; - sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_manager(lc->factory),devid); + sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_card_manager(lc->factory),devid); if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_CAPTURE)) return TRUE; return FALSE; } @@ -4508,7 +4508,7 @@ bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devi **/ bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *devid){ MSSndCard *sndcard; - sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_manager(lc->factory),devid); + sndcard=ms_snd_card_manager_get_card(ms_factory_get_snd_card_manager(lc->factory),devid); if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_PLAYBACK)) return TRUE; return FALSE; } @@ -4634,7 +4634,7 @@ void linphone_core_reload_sound_devices(LinphoneCore *lc){ if (capture != NULL) { capture_copy = ms_strdup(capture); } - ms_snd_card_manager_reload(ms_factory_get_snd_manager(lc->factory)); + ms_snd_card_manager_reload(ms_factory_get_snd_card_manager(lc->factory)); build_sound_devices_table(lc); if (ringer_copy != NULL) { linphone_core_set_ringer_device(lc, ringer_copy); @@ -4656,7 +4656,7 @@ void linphone_core_reload_video_devices(LinphoneCore *lc){ if (devid != NULL) { devid_copy = ms_strdup(devid); } - ms_web_cam_manager_reload(ms_factory_get_wbc_manager(lc->factory)); + ms_web_cam_manager_reload(ms_factory_get_web_cam_manager(lc->factory)); build_video_devices_table(lc); if (devid_copy != NULL) { linphone_core_set_video_device(lc, devid_copy); @@ -4789,8 +4789,8 @@ int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCb return err; } -MSFactory *linphone_core_get_factory(void *lc){ - return ((LinphoneCore*)lc)->factory; +MSFactory *linphone_core_get_ms_factory(LinphoneCore *lc){ + return lc->factory; } /** * Sets the path to a wav file used for ringing back. @@ -5407,13 +5407,13 @@ int linphone_core_set_video_device(LinphoneCore *lc, const char *id){ MSWebCam *olddev=lc->video_conf.device; const char *vd; if (id!=NULL){ - lc->video_conf.device=ms_web_cam_manager_get_cam(ms_factory_get_wbc_manager(lc->factory),id); + lc->video_conf.device=ms_web_cam_manager_get_cam(ms_factory_get_web_cam_manager(lc->factory),id); if (lc->video_conf.device==NULL){ ms_warning("Could not find video device %s",id); } } if (lc->video_conf.device==NULL) - lc->video_conf.device=ms_web_cam_manager_get_default_cam(ms_factory_get_wbc_manager(lc->factory)); + lc->video_conf.device=ms_web_cam_manager_get_default_cam(ms_factory_get_web_cam_manager(lc->factory)); if (olddev!=NULL && olddev!=lc->video_conf.device){ toggle_video_preview(lc,FALSE);/*restart the video local preview*/ } @@ -5922,7 +5922,7 @@ static MSFilter *get_audio_resource(LinphoneCore *lc, LinphoneAudioResourceType if (ringcard == NULL) return NULL; - ringstream=lc->ringstream=ring_start(NULL,0,ringcard, lc->factory); + ringstream=lc->ringstream=ring_start(lc->factory, NULL,0,ringcard); ms_filter_call_method(lc->ringstream->gendtmf,MS_DTMF_GEN_SET_DEFAULT_AMPLITUDE,&); lc->dmfs_playing_start_time = ms_get_cur_time_ms()/1000; }else{ @@ -6440,13 +6440,12 @@ static void linphone_core_uninit(LinphoneCore *lc) if (lc->supported_formats) ms_free(lc->supported_formats); linphone_core_message_storage_close(lc); linphone_core_call_log_storage_close(lc); - - lc->factory = ms_factory_exit(lc->factory); - linphone_core_set_state(lc,LinphoneGlobalOff,"Off"); linphone_core_deactivate_log_serialization_if_needed(); ms_list_free_with_data(lc->vtable_refs,(void (*)(void *))v_table_reference_destroy); + + ms_factory_destroy(lc->factory); } static void set_sip_network_reachable(LinphoneCore* lc,bool_t is_sip_reachable, time_t curtime){ diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 31aee17a5..bf8e5af31 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -41,11 +41,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define LINPHONE_PUBLIC MS2_PUBLIC #endif -#ifndef LINPHONE_DEPRECATED +#ifndef MS2_DEPRECATED #if defined(_MSC_VER) - #define LINPHONE_DEPRECATED __declspec(deprecated) + #define MS2_DEPRECATED __declspec(deprecated) #else - #define LINPHONE_DEPRECATED __attribute__ ((deprecated)) + #define MS2_DEPRECATED __attribute__ ((deprecated)) #endif #endif @@ -627,7 +627,7 @@ typedef struct _LinphonePlayer LinphonePlayer; **/ typedef void (*LinphonePlayerEofCallback)(struct _LinphonePlayer *obj, void *user_data); -LINPHONE_PUBLIC int linphone_player_open(MSFactory* f, LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data); +LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data); LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj); LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj); LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms); @@ -896,7 +896,7 @@ LINPHONE_PUBLIC void linphone_call_set_native_video_window_id(LinphoneCall *call * @deprecated Use linphone_call_get_conference() instead. * @ingroup call_control */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_call_is_in_conference(const LinphoneCall *call); +LINPHONE_PUBLIC MS2_DEPRECATED bool_t linphone_call_is_in_conference(const LinphoneCall *call); /** * Return the associated conference object @@ -1336,7 +1336,7 @@ LINPHONE_PUBLIC bool_t linphone_core_chat_enabled(const LinphoneCore *lc); * @param cr #LinphoneChatRoom object * @deprecated Use linphone_chat_room_unref() instead. */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_destroy(LinphoneChatRoom *cr); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_chat_room_destroy(LinphoneChatRoom *cr); /** * Create a message attached to a dedicated chat room; * @param cr the chat room. @@ -1406,7 +1406,7 @@ LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(Linph * @param cr #LinphoneChatRoom object * @param msg message to be sent */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg); /** * Send a message to peer member of this chat room. * @param cr #LinphoneChatRoom object @@ -1417,7 +1417,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message(Linphon * @note The LinphoneChatMessage must not be destroyed until the the callback is called. * The LinphoneChatMessage reference is transfered to the function and thus doesn't need to be unref'd by the application. */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangedCb status_cb,void* ud); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangedCb status_cb,void* ud); /** * Send a message to peer member of this chat room. * @param[in] cr LinphoneChatRoom object @@ -1492,7 +1492,7 @@ LINPHONE_PUBLIC int linphone_chat_room_get_unread_messages_count(LinphoneChatRoo * Returns back pointer to LinphoneCore object. * @deprecated use linphone_chat_room_get_core() **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr); +LINPHONE_PUBLIC MS2_DEPRECATED LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr); /** * Returns back pointer to LinphoneCore object. **/ @@ -1601,7 +1601,7 @@ LINPHONE_PUBLIC const LinphoneContent* linphone_chat_message_get_file_transfer_i * @param status_cb LinphoneChatMessageStateChangeCb status callback invoked when file is downloaded or could not be downloaded * @deprecated Use linphone_chat_message_download_file() instead. */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_chat_message_start_file_download(LinphoneChatMessage* message, LinphoneChatMessageStateChangedCb status_cb, void* ud); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_chat_message_start_file_download(LinphoneChatMessage* message, LinphoneChatMessageStateChangedCb status_cb, void* ud); /** * Start the download of the file referenced in a LinphoneChatMessage from remote server. * @param[in] message LinphoneChatMessage object. @@ -2091,15 +2091,15 @@ typedef struct _LinphoneCoreVTable{ LinphoneCoreNotifyReceivedCb notify_received; /**< Notifies a an event notification, see linphone_core_subscribe() */ LinphoneCorePublishStateChangedCb publish_state_changed;/**Notifies publish state change (only from #LinphoneEvent api)*/ LinphoneCoreConfiguringStatusCb configuring_status; /** Notifies configuring status changes */ - LINPHONE_DEPRECATED DisplayStatusCb display_status; /**< @deprecated Callback that notifies various events with human readable text.*/ - LINPHONE_DEPRECATED DisplayMessageCb display_message;/**< @deprecated Callback to display a message to the user */ - LINPHONE_DEPRECATED DisplayMessageCb display_warning;/**< @deprecated Callback to display a warning to the user */ - LINPHONE_DEPRECATED DisplayUrlCb display_url; /**< @deprecated */ - LINPHONE_DEPRECATED ShowInterfaceCb show; /**< @deprecated Notifies the application that it should show up*/ - LINPHONE_DEPRECATED LinphoneCoreTextMessageReceivedCb text_received; /**< @deprecated, use #message_received instead
A text message has been received */ - LINPHONE_DEPRECATED LinphoneCoreFileTransferRecvCb file_transfer_recv; /**< @deprecated Callback to store file received attached to a #LinphoneChatMessage */ - LINPHONE_DEPRECATED LinphoneCoreFileTransferSendCb file_transfer_send; /**< @deprecated Callback to collect file chunk to be sent for a #LinphoneChatMessage */ - LINPHONE_DEPRECATED LinphoneCoreFileTransferProgressIndicationCb file_transfer_progress_indication; /**< @deprecated Callback to indicate file transfer progress */ + MS2_DEPRECATED DisplayStatusCb display_status; /**< @deprecated Callback that notifies various events with human readable text.*/ + MS2_DEPRECATED DisplayMessageCb display_message;/**< @deprecated Callback to display a message to the user */ + MS2_DEPRECATED DisplayMessageCb display_warning;/**< @deprecated Callback to display a warning to the user */ + MS2_DEPRECATED DisplayUrlCb display_url; /**< @deprecated */ + MS2_DEPRECATED ShowInterfaceCb show; /**< @deprecated Notifies the application that it should show up*/ + MS2_DEPRECATED LinphoneCoreTextMessageReceivedCb text_received; /**< @deprecated, use #message_received instead
A text message has been received */ + MS2_DEPRECATED LinphoneCoreFileTransferRecvCb file_transfer_recv; /**< @deprecated Callback to store file received attached to a #LinphoneChatMessage */ + MS2_DEPRECATED LinphoneCoreFileTransferSendCb file_transfer_send; /**< @deprecated Callback to collect file chunk to be sent for a #LinphoneChatMessage */ + MS2_DEPRECATED LinphoneCoreFileTransferProgressIndicationCb file_transfer_progress_indication; /**< @deprecated Callback to indicate file transfer progress */ LinphoneCoreNetworkReachableCb network_reachable; /**< Callback to report IP network status (I.E up/down )*/ LinphoneCoreLogCollectionUploadStateChangedCb log_collection_upload_state_changed; /**< Callback to upload collected logs */ LinphoneCoreLogCollectionUploadProgressIndicationCb log_collection_upload_progress_indication; /**< Callback to indicate log collection upload progress */ @@ -2357,11 +2357,11 @@ LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *lc); /** * @deprecated Use #linphone_core_get_user_agent instead. **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_name(void); +LINPHONE_PUBLIC MS2_DEPRECATED const char *linphone_core_get_user_agent_name(void); /** * @deprecated Use #linphone_core_get_user_agent instead. **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_version(void); +LINPHONE_PUBLIC MS2_DEPRECATED const char *linphone_core_get_user_agent_version(void); /** * Instanciates a LinphoneCore object. @@ -2533,7 +2533,7 @@ LINPHONE_PUBLIC LinphoneCall *linphone_core_get_call_by_remote_address2(Linphone * @param dtmf The dtmf name specified as a char, such as '0', '#' etc... * **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf); /** * Sets the local "from" identity. @@ -2906,7 +2906,7 @@ LINPHONE_PUBLIC void linphone_core_set_default_proxy_index(LinphoneCore *lc, int * @return the default proxy configuration, that is the one used to determine the current identity. * @deprecated Use linphone_core_get_default_proxy_config() instead. **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config); +LINPHONE_PUBLIC MS2_DEPRECATED int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config); /** * @return the default proxy configuration, that is the one used to determine the current identity. @@ -3241,7 +3241,10 @@ 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); +/** + * Returns the MSFactory (mediastreamer2 factory) used by the LinphoneCore to control mediastreamer2 library. +**/ +LINPHONE_PUBLIC MSFactory* linphone_core_get_ms_factory(LinphoneCore* 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); @@ -3268,13 +3271,13 @@ bool_t linphone_core_agc_enabled(const LinphoneCore *lc); /** * @deprecated Use #linphone_core_enable_mic instead. **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted); /** * Get mic state. * @deprecated Use #linphone_core_mic_enabled instead **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_is_mic_muted(LinphoneCore *lc); +LINPHONE_PUBLIC MS2_DEPRECATED bool_t linphone_core_is_mic_muted(LinphoneCore *lc); /** * Enable or disable the microphone. @@ -3402,7 +3405,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_supported(LinphoneCore *lc); * @ingroup media_parameters * @deprecated Use #linphone_core_enable_video_capture and #linphone_core_enable_video_display instead. **/ -LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled); +LINPHONE_PUBLIC MS2_DEPRECATED void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled); /** * Returns TRUE if either capture or display is enabled, FALSE otherwise. @@ -4392,7 +4395,7 @@ LINPHONE_PUBLIC LinphoneTransportType linphone_transport_parse(const char* trans * @return LinphoneCallParams * @deprecated use linphone_core_create_call_params() */ -LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc); +LINPHONE_PUBLIC MS2_DEPRECATED LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc); typedef struct _LinphoneRingtonePlayer LinphoneRingtonePlayer; diff --git a/coreapi/localplayer.c b/coreapi/localplayer.c index 91ce833a9..a741a0a9b 100644 --- a/coreapi/localplayer.c +++ b/coreapi/localplayer.c @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -static int _local_player_open(LinphonePlayer *obj, const char *filename, MSFactory *factory); +static int _local_player_open(LinphonePlayer *obj, const char *filename); static int _local_player_start(LinphonePlayer *obj); static int _local_player_pause(LinphonePlayer *obj); static int _local_player_seek(LinphonePlayer *obj, int time_ms); @@ -36,7 +36,7 @@ LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *s LinphonePlayer *obj = ms_new0(LinphonePlayer, 1); if(snd_card == NULL) snd_card = lc->sound_conf.ring_sndcard; if(video_out == NULL) video_out = linphone_core_get_video_display_filter(lc); - obj->impl = ms_media_player_new(snd_card, video_out, window_id); + obj->impl = ms_media_player_new(lc->factory, snd_card, video_out, window_id); obj->open = _local_player_open; obj->start = _local_player_start; obj->pause = _local_player_pause; @@ -54,8 +54,8 @@ bool_t linphone_local_player_matroska_supported(void) { return ms_media_player_matroska_supported(); } -static int _local_player_open(LinphonePlayer *obj, const char *filename,MSFactory* factory) { - return ms_media_player_open((MSMediaPlayer *)obj->impl, filename, factory) ? 0 : -1; +static int _local_player_open(LinphonePlayer *obj, const char *filename) { + return ms_media_player_open((MSMediaPlayer *)obj->impl, filename) ? 0 : -1; } static int _local_player_start(LinphonePlayer *obj) { diff --git a/coreapi/lsd.c b/coreapi/lsd.c index b2000632d..dd28511a5 100644 --- a/coreapi/lsd.c +++ b/coreapi/lsd.c @@ -61,7 +61,7 @@ struct _LinphoneSoundDaemon { static MSFilter *create_writer(MSSndCard *c){ LinphoneSoundDaemon *lsd=(LinphoneSoundDaemon*)c->data; - MSFilter *itcsink=ms_factory_create_filter(ms_snd_card_factory_get(c), MS_ITC_SINK_ID); + MSFilter *itcsink=ms_factory_create_filter(ms_snd_card_get_factory(c), MS_ITC_SINK_ID); ms_filter_call_method(itcsink,MS_ITC_SINK_CONNECT,lsd->branches[0].player); return itcsink; } @@ -223,11 +223,11 @@ LinphoneSoundDaemon * linphone_sound_daemon_new(MSFactory* factory, const char * int i; MSConnectionPoint mp; LinphoneSoundDaemon *lsd; - MSSndCard *card=ms_snd_card_manager_get_card(ms_factory_get_snd_manager(factory), + MSSndCard *card=ms_snd_card_manager_get_card(ms_factory_get_snd_card_manager(factory), cardname); if (card==NULL){ card=ms_snd_card_manager_get_default_playback_card ( - ms_factory_get_snd_manager(factory)); + ms_factory_get_snd_card_manager(factory)); if (card==NULL){ ms_error("linphone_sound_daemon_new(): No playback soundcard available"); return NULL; @@ -236,7 +236,7 @@ LinphoneSoundDaemon * linphone_sound_daemon_new(MSFactory* factory, const char * lsd=ms_new0(LinphoneSoundDaemon,1); lsd->soundout=ms_snd_card_create_writer(card); - lsd->mixer=ms_factory_create_filter(ms_snd_card_factory_get(card),MS_AUDIO_MIXER_ID); + lsd->mixer=ms_factory_create_filter(ms_snd_card_get_factory(card),MS_AUDIO_MIXER_ID); lsd->out_rate=rate; lsd->out_nchans=nchannels; ms_filter_call_method(lsd->soundout,MS_FILTER_SET_SAMPLE_RATE,&lsd->out_rate); diff --git a/coreapi/player.c b/coreapi/player.c index 8c9913ab6..668b91c01 100644 --- a/coreapi/player.c +++ b/coreapi/player.c @@ -28,10 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * @param user_data a user-data provided in the callback to help the application to retrieve its context. * @return 0 if successful, -1 otherwise **/ -int linphone_player_open(MSFactory *f, LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){ +int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){ obj->user_data=user_data; obj->cb=cb; - return obj->open(obj,filename, f); + return obj->open(obj,filename); } /** @@ -137,7 +137,7 @@ static void on_eof(void *user_data, MSFilter *f, unsigned int event_id, void *ar if (player->cb) player->cb(player,player->user_data); } -static int call_player_open(LinphonePlayer* player, const char *filename, MSFactory *factory){ +static int call_player_open(LinphonePlayer* player, const char *filename){ LinphoneCall *call=(LinphoneCall*)player->impl; MSFilter *filter; if (!call_player_check_state(player,FALSE)) return -1; diff --git a/coreapi/private.h b/coreapi/private.h index 8cb2d030a..7236d025f 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -1235,7 +1235,7 @@ LINPHONE_PUBLIC int linphone_remote_provisioning_load_file( LinphoneCore* lc, co ****************************************************************************/ struct _LinphonePlayer{ - int (*open)(struct _LinphonePlayer* player, const char *filename, MSFactory *factory); + int (*open)(struct _LinphonePlayer* player, const char *filename); int (*start)(struct _LinphonePlayer* player); int (*pause)(struct _LinphonePlayer* player); int (*seek)(struct _LinphonePlayer* player, int time_ms); diff --git a/gtk/audio_assistant.c b/gtk/audio_assistant.c index a3f765a27..e3166b4a4 100644 --- a/gtk/audio_assistant.c +++ b/gtk/audio_assistant.c @@ -211,15 +211,15 @@ static gboolean linphone_gtk_stop_record(gpointer data){ void linphone_gtk_start_record_sound(GtkWidget *w, gpointer data){ LinphoneCore *lc = linphone_gtk_get_core(); - MSFactory *factory = linphone_core_get_factory((void*)lc); + MSFactory *factory = linphone_core_get_ms_factory(lc); AudioStream *stream = NULL; - MSSndCardManager *manager = ms_factory_get_snd_manager(factory); + MSSndCardManager *manager = ms_factory_get_snd_card_manager(factory); gboolean active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); gint timeout_id; if(active){ gchar *path = get_record_file(); - stream=audio_stream_new(8888, 8889, FALSE, factory); + stream=audio_stream_new(factory, 8888, 8889, FALSE); if(stream != NULL){ audio_stream_start_full(stream,&av_profile,"127.0.0.1",8888,"127.0.0.1",8889,0,0,NULL, path,NULL,ms_snd_card_manager_get_card(manager,linphone_core_get_capture_device(lc)),FALSE); @@ -256,14 +256,14 @@ static void endoffile_cb(void *ud, MSFilter *f, unsigned int ev,void * arg){ void linphone_gtk_start_play_record_sound(GtkWidget *w,gpointer data){ LinphoneCore *lc = linphone_gtk_get_core(); - MSFactory *factory = linphone_core_get_factory((void*)lc); + MSFactory *factory = linphone_core_get_ms_factory(lc); gboolean active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); AudioStream *stream = NULL; - MSSndCardManager *manager = ms_factory_get_snd_manager(factory); + MSSndCardManager *manager = ms_factory_get_snd_card_manager(factory); if(active){ gchar *path = g_object_get_data(G_OBJECT(audio_assistant),"path"); - stream=audio_stream_new(8888, 8889, FALSE, factory); + stream=audio_stream_new(factory, 8888, 8889, FALSE); if(path != NULL){ audio_stream_start_full(stream,&av_profile,"127.0.0.1",8888,"127.0.0.1",8889,0,0,path, NULL,ms_snd_card_manager_get_card(manager,linphone_core_get_playback_device(lc)),NULL,FALSE); @@ -448,15 +448,15 @@ static GtkWidget *create_end_page(void){ static void prepare(GtkAssistant *w){ AudioStream *audio_stream = NULL; LinphoneCore *lc=linphone_gtk_get_core(); - MSFactory *factory = linphone_core_get_factory((void*)lc); + MSFactory *factory = linphone_core_get_ms_factory(lc); int page = gtk_assistant_get_current_page(w); GtkWidget *mic_audiolevel = get_widget_from_assistant("mic_audiolevel"); GtkWidget *label_audiolevel = get_widget_from_assistant("label_audiolevel"); //Speaker page if(page == 1){ - MSSndCardManager *manager = ms_factory_get_snd_manager(factory); - audio_stream = audio_stream_start_with_sndcards(&av_profile,9898,"127.0.0.1",19898,0,0,ms_snd_card_manager_get_card(manager,linphone_core_get_playback_device(lc)),ms_snd_card_manager_get_card(manager,linphone_core_get_capture_device(lc)),FALSE, factory); + MSSndCardManager *manager = ms_factory_get_snd_card_manager(factory); + audio_stream = audio_stream_start_with_sndcards(factory, &av_profile,9898,"127.0.0.1",19898,0,0,ms_snd_card_manager_get_card(manager,linphone_core_get_playback_device(lc)),ms_snd_card_manager_get_card(manager,linphone_core_get_capture_device(lc)),FALSE); if (mic_audiolevel != NULL && audio_stream != NULL){ g_object_set_data(G_OBJECT(audio_assistant),"stream",audio_stream); linphone_gtk_init_audio_meter(mic_audiolevel,(get_volume_t)audio_stream_get_record_volume,audio_stream); diff --git a/gtk/propertybox.c b/gtk/propertybox.c index fa2898e3d..b826029c8 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -1417,7 +1417,7 @@ void linphone_gtk_fill_webcams(GtkWidget *pb){ void linphone_gtk_fill_video_renderers(GtkWidget *pb){ #ifdef VIDEO_ENABLED /* video_stream_get_default_video_renderer requires video enabled */ LinphoneCore *lc=linphone_gtk_get_core(); - MSFactory *factory = linphone_core_get_factory((void*)lc); + MSFactory *factory = linphone_core_get_ms_factory(lc); GtkWidget *combo=linphone_gtk_get_widget(pb,"renderers"); MSList *l=ms_factory_lookup_filter_by_interface(factory, MSFilterVideoDisplayInterface); MSList *elem; diff --git a/gtk/videowindow.c b/gtk/videowindow.c index 0cf6ac5d3..86c84ac5a 100644 --- a/gtk/videowindow.c +++ b/gtk/videowindow.c @@ -63,7 +63,7 @@ static void drag_data_received(GtkWidget *widget, GdkDragContext *context, gint if (player){ const char* filepath = (strstr(path,"file://")==path) ? path+strlen("file://") : path; - if (linphone_player_open(linphone_core_get_factory((void*)linphone_call_get_core(call)),player,filepath,on_end_of_play,NULL)==0){ + if (linphone_player_open(player,filepath,on_end_of_play,NULL)==0){ linphone_player_start(player); }else{ diff --git a/mediastreamer2 b/mediastreamer2 index b2eb303aa..483fcd85d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit b2eb303aabac2620b80f366d4aab50d38d7acc86 +Subproject commit 483fcd85d98ffdf220e37195575c6dd8209e7d6b diff --git a/tester/call_tester.c b/tester/call_tester.c index ab0491710..0e0f58674 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -2917,7 +2917,7 @@ static void call_with_file_player(void) { player=linphone_call_get_player(linphone_core_get_current_call(marie->lc)); BC_ASSERT_PTR_NOT_NULL(player); if (player){ - BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory, player,hellopath,on_eof,marie),0, int, "%d"); + BC_ASSERT_EQUAL(linphone_player_open(player,hellopath,on_eof,marie),0, int, "%d"); BC_ASSERT_EQUAL(linphone_player_start(player),0, int, "%d"); } /* This assert should be modified to be at least as long as the WAV file */ @@ -2983,7 +2983,7 @@ static void call_with_mkv_file_player(void) { player=linphone_call_get_player(linphone_core_get_current_call(marie->lc)); BC_ASSERT_PTR_NOT_NULL(player); if (player){ - int res = linphone_player_open(marie->lc->factory, player,hellomkv,on_eof,marie); + int res = linphone_player_open(player,hellomkv,on_eof,marie); //if(!ms_filter_codec_supported("opus")) { if(!ms_factory_codec_supported(marie->lc->factory, "opus") && !ms_factory_codec_supported(pauline->lc->factory, "opus")){ BC_ASSERT_EQUAL(res, -1, int, "%d"); @@ -5047,7 +5047,7 @@ static void call_with_rtp_io_mode(void) { player = linphone_call_get_player(linphone_core_get_current_call(marie->lc)); BC_ASSERT_PTR_NOT_NULL(player); if (player) { - BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory, player, hellopath, on_eof, marie) , 0, int, "%d"); + BC_ASSERT_EQUAL(linphone_player_open(player, hellopath, on_eof, marie) , 0, int, "%d"); BC_ASSERT_EQUAL(linphone_player_start(player) , 0, int, "%d"); } @@ -5339,7 +5339,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) { BC_ASSERT_PTR_NOT_NULL(player); if (player) { // This will ask pauline to play the file - BC_ASSERT_EQUAL(linphone_player_open(marie->lc->factory,player, hellopath, on_eof, pauline),0, int, "%d"); + BC_ASSERT_EQUAL(linphone_player_open(player, hellopath, on_eof, pauline),0, int, "%d"); BC_ASSERT_EQUAL(linphone_player_start(player), 0, int, "%d"); } /* This assert should be modified to be at least as long as the WAV file */ diff --git a/tester/player_tester.c b/tester/player_tester.c index 1575531aa..7625329ed 100644 --- a/tester/player_tester.c +++ b/tester/player_tester.c @@ -44,16 +44,16 @@ static void play_file(const char *filename, bool_t supported_format, const char BC_ASSERT_PTR_NOT_NULL(lc_manager); if(lc_manager == NULL) return; - audio_codec_supported = (audio_mime && ms_factory_get_decoder(linphone_core_get_factory((void *)lc_manager->lc), audio_mime)); - video_codec_supported = (video_mime && ms_factory_get_decoder(linphone_core_get_factory((void *)lc_manager->lc), video_mime)); + audio_codec_supported = (audio_mime && ms_factory_get_decoder(linphone_core_get_ms_factory((void *)lc_manager->lc), audio_mime)); + video_codec_supported = (video_mime && ms_factory_get_decoder(linphone_core_get_ms_factory((void *)lc_manager->lc), video_mime)); player = linphone_core_create_local_player(lc_manager->lc, - ms_snd_card_manager_get_default_card(ms_factory_get_snd_manager(linphone_core_get_factory((void *)lc_manager->lc))), + ms_snd_card_manager_get_default_card(ms_factory_get_snd_card_manager(linphone_core_get_ms_factory((void *)lc_manager->lc))), video_stream_get_default_video_renderer(), 0); BC_ASSERT_PTR_NOT_NULL(player); if(player == NULL) goto fail; - res = linphone_player_open(linphone_core_get_factory((void*)lc_manager->lc), player, filename, eof_callback, &eof); + res = linphone_player_open(player, filename, eof_callback, &eof); if(supported_format && (audio_codec_supported || video_codec_supported)) { BC_ASSERT_EQUAL(res, 0, int, "%d"); } else { diff --git a/tester/tester.c b/tester/tester.c index 08f010dc0..510f5d3b4 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -296,13 +296,13 @@ void linphone_core_manager_init(LinphoneCoreManager *mgr, const char* rc_file) { { MSWebCam *cam; - cam = ms_web_cam_manager_get_cam(ms_factory_get_wbc_manager(mgr->lc->factory), "Mire: Mire (synthetic moving picture)"); + cam = ms_web_cam_manager_get_cam(ms_factory_get_web_cam_manager(mgr->lc->factory), "Mire: Mire (synthetic moving picture)"); if (cam == NULL) { MSWebCamDesc *desc = ms_mire_webcam_desc_get(); if (desc){ cam=ms_web_cam_new(desc); - ms_web_cam_manager_add_cam(ms_factory_get_wbc_manager(mgr->lc->factory), cam); + ms_web_cam_manager_add_cam(ms_factory_get_web_cam_manager(mgr->lc->factory), cam); } } } diff --git a/tools/auto_answer.c b/tools/auto_answer.c index d39a70fd3..133b88d84 100644 --- a/tools/auto_answer.c +++ b/tools/auto_answer.c @@ -164,7 +164,7 @@ int main(int argc, char *argv[]){ { MSWebCamDesc *desc = ms_mire_webcam_desc_get(); if (desc){ - ms_web_cam_manager_add_cam(ms_factory_get_wbc_manager(linphone_core_get_factory((void*)lc)),ms_web_cam_new(desc)); + ms_web_cam_manager_add_cam(ms_factory_get_web_cam_manager(linphone_core_get_ms_factory(lc)),ms_web_cam_new(desc)); linphone_core_set_video_device(lc,"Mire: Mire (synthetic moving picture)"); } } diff --git a/tools/test_lsd.c b/tools/test_lsd.c index ed38fedde..9c308cb04 100644 --- a/tools/test_lsd.c +++ b/tools/test_lsd.c @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) { linphone_core_enable_logs(stdout); lc = linphone_core_new(&vtable, NULL, NULL, NULL); - lsd = linphone_sound_daemon_new(NULL, 44100, 1); + lsd = linphone_sound_daemon_new(linphone_core_get_ms_factory(lc), NULL, 44100, 1); linphone_core_use_sound_daemon(lc, lsd);