mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
fix g++ build
This commit is contained in:
parent
aa548fa35d
commit
fbf0aaca5b
8 changed files with 91 additions and 65 deletions
|
|
@ -62,13 +62,11 @@ static LinphoneCall * look_for_broken_call_to_replace(SalOp *h, LinphoneCore *lc
|
|||
const bctbx_list_t *calls = linphone_core_get_calls(lc);
|
||||
const bctbx_list_t *it = calls;
|
||||
while (it != NULL) {
|
||||
LinphoneCall *replaced_call = NULL;
|
||||
#if 0
|
||||
LinphoneCall *replaced_call = NULL;
|
||||
LinphoneCall *call = (LinphoneCall *)bctbx_list_get_data(it);
|
||||
#endif
|
||||
SalOp *replaced_op = sal_call_get_replaces(h);
|
||||
if (replaced_op) replaced_call = (LinphoneCall*)sal_op_get_user_pointer(replaced_op);
|
||||
#if 0
|
||||
if ((call->broken && sal_call_compare_op(h, call->op))
|
||||
|| ((replaced_call == call) && (strcmp(sal_op_get_from(h), sal_op_get_from(replaced_op)) == 0) && (strcmp(sal_op_get_to(h), sal_op_get_to(replaced_op)) == 0))) {
|
||||
return call;
|
||||
|
|
@ -202,11 +200,11 @@ static void call_ringing(SalOp *h) {
|
|||
L_GET_PRIVATE(session)->remoteRinging();
|
||||
}
|
||||
|
||||
static void start_pending_refer(LinphoneCall *call){
|
||||
#if 0
|
||||
static void start_pending_refer(LinphoneCall *call){
|
||||
linphone_core_start_refered_call(call->core, call,NULL);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* could be reach :
|
||||
|
|
@ -259,8 +257,8 @@ static void call_terminated(SalOp *op, const char *from) {
|
|||
L_GET_PRIVATE(session)->terminated();
|
||||
}
|
||||
|
||||
static int resume_call_after_failed_transfer(LinphoneCall *call){
|
||||
#if 0
|
||||
static int resume_call_after_failed_transfer(LinphoneCall *call){
|
||||
if (call->was_automatically_paused && call->state==LinphoneCallPausing)
|
||||
return BELLE_SIP_CONTINUE; /*was still in pausing state*/
|
||||
|
||||
|
|
@ -274,10 +272,8 @@ static int resume_call_after_failed_transfer(LinphoneCall *call){
|
|||
}
|
||||
linphone_call_unref(call);
|
||||
return BELLE_SIP_STOP;
|
||||
#else
|
||||
return BELLE_SIP_STOP;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static void call_failure(SalOp *op) {
|
||||
LinphonePrivate::CallSession *session = reinterpret_cast<LinphonePrivate::CallSession *>(sal_op_get_user_pointer(op));
|
||||
|
|
|
|||
|
|
@ -639,6 +639,7 @@ void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, Lin
|
|||
void linphone_call_init_media_streams(LinphoneCall *call){
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int dtmf_tab[16]={'0','1','2','3','4','5','6','7','8','9','*','#','A','B','C','D'};
|
||||
|
||||
static void linphone_core_dtmf_received(LinphoneCall *call, int dtmf){
|
||||
|
|
@ -648,6 +649,7 @@ static void linphone_core_dtmf_received(LinphoneCall *call, int dtmf){
|
|||
}
|
||||
linphone_call_notify_dtmf_received(call, dtmf_tab[dtmf]);
|
||||
}
|
||||
#endif
|
||||
|
||||
void set_playback_gain_db(AudioStream *st, float gain){
|
||||
if (st->volrecv){
|
||||
|
|
@ -659,18 +661,22 @@ void set_playback_gain_db(AudioStream *st, float gain){
|
|||
void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t muted){
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void setup_ring_player(LinphoneCore *lc, LinphoneCall *call){
|
||||
int pause_time=3000;
|
||||
audio_stream_play(call->audiostream,lc->sound_conf.ringback_tone);
|
||||
ms_filter_call_method(call->audiostream->soundread,MS_FILE_PLAYER_LOOP,&pause_time);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static bool_t linphone_call_sound_resources_available(LinphoneCall *call){
|
||||
LinphoneCore *lc=call->core;
|
||||
LinphoneCall *current=linphone_core_get_current_call(lc);
|
||||
return !linphone_core_is_in_conference(lc) &&
|
||||
(current==NULL || current==call);
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_call_delete_upnp_session(LinphoneCall *call){
|
||||
}
|
||||
|
|
@ -943,6 +949,7 @@ void linphone_call_stop_recording(LinphoneCall *call) {
|
|||
linphone_call_get_cpp_obj(call)->stopRecording();
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void linphone_call_lost(LinphoneCall *call){
|
||||
LinphoneCore *lc = call->core;
|
||||
char *temp = NULL;
|
||||
|
|
@ -959,6 +966,7 @@ static void linphone_call_lost(LinphoneCall *call){
|
|||
linphone_core_play_named_tone(lc, LinphoneToneCallLost);
|
||||
ms_free(temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*do not change the prototype of this function, it is also used internally in linphone-daemon.*/
|
||||
void linphone_call_stats_fill(LinphoneCallStats *stats, MediaStream *ms, OrtpEvent *ev){
|
||||
|
|
@ -1067,7 +1075,7 @@ const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call) {
|
|||
return call->paramsCache;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static int send_dtmf_handler(void *data, unsigned int revents){
|
||||
LinphoneCall *call = (LinphoneCall*)data;
|
||||
/*By default we send DTMF RFC2833 if we do not have enabled SIP_INFO but we can also send RFC2833 and SIP_INFO*/
|
||||
|
|
@ -1100,6 +1108,7 @@ static int send_dtmf_handler(void *data, unsigned int revents){
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LinphoneStatus linphone_call_send_dtmf(LinphoneCall *call, char dtmf) {
|
||||
#if 0
|
||||
|
|
@ -1210,8 +1219,10 @@ LinphoneStatus linphone_call_resume(LinphoneCall *call) {
|
|||
return linphone_call_get_cpp_obj(call)->resume();
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void terminate_call(LinphoneCall *call) {
|
||||
}
|
||||
#endif
|
||||
|
||||
LinphoneStatus linphone_call_terminate(LinphoneCall *call) {
|
||||
return linphone_call_get_cpp_obj(call)->terminate();
|
||||
|
|
@ -1388,6 +1399,7 @@ void linphone_call_set_broken(LinphoneCall *call){
|
|||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void linphone_call_repair_by_invite_with_replaces(LinphoneCall *call) {
|
||||
const char *call_id = sal_op_get_call_id(call->op);
|
||||
const char *from_tag = sal_call_get_local_tag(call->op);
|
||||
|
|
@ -1397,6 +1409,7 @@ static void linphone_call_repair_by_invite_with_replaces(LinphoneCall *call) {
|
|||
sal_call_set_replaces(call->op, call_id, from_tag, to_tag);
|
||||
linphone_call_start_invite(call, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_call_reinvite_to_recover_from_connection_loss(LinphoneCall *call) {
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ const char *linphone_ice_state_to_string(LinphoneIceState state){
|
|||
void linphone_call_update_ice_state_in_call_stats(LinphoneCall *call) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void get_default_addr_and_port(uint16_t componentID, const SalMediaDescription *md, const SalStreamDescription *stream, const char **addr, int *port)
|
||||
{
|
||||
if (componentID == 1) {
|
||||
|
|
@ -254,6 +255,7 @@ static void get_default_addr_and_port(uint16_t componentID, const SalMediaDescri
|
|||
} else return;
|
||||
if ((*addr)[0] == '\0') *addr = md->addr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_call_clear_unused_ice_candidates(LinphoneCall *call, const SalMediaDescription *md){
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
/*since printf family functions are LOCALE dependent, float separator may differ
|
||||
depending on the user's locale (LC_NUMERIC environment var).*/
|
||||
#if 0
|
||||
static char * float_to_one_decimal_string(float f) {
|
||||
float rounded_f = floorf(f * 10 + .5f) / 10;
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ static char * float_to_one_decimal_string(float f) {
|
|||
|
||||
return ms_strdup_printf("%d.%d", floor_part, one_decimal_part);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void append_to_buffer_valist(char **buff, size_t *buff_size, size_t *offset, const char *fmt, va_list args) {
|
||||
belle_sip_error_code ret;
|
||||
|
|
@ -81,12 +83,14 @@ static void append_to_buffer_valist(char **buff, size_t *buff_size, size_t *offs
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void append_to_buffer(char **buff, size_t *buff_size, size_t *offset, const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
append_to_buffer_valist(buff, buff_size, offset, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void reset_avg_metrics(reporting_session_report_t * report){
|
||||
int i;
|
||||
|
|
@ -118,6 +122,7 @@ static void reset_avg_metrics(reporting_session_report_t * report){
|
|||
#define METRICS_DELAY 1 << 4
|
||||
#define METRICS_SIGNAL 1 << 5
|
||||
|
||||
#if 0
|
||||
static uint8_t are_metrics_filled(const reporting_content_metrics_t *rm) {
|
||||
uint8_t ret = 0;
|
||||
|
||||
|
|
@ -152,17 +157,16 @@ static uint8_t are_metrics_filled(const reporting_content_metrics_t *rm) {
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool_t quality_reporting_enabled(const LinphoneCall * call) {
|
||||
#if 0
|
||||
return (call->dest_proxy != NULL && linphone_proxy_config_quality_reporting_enabled(call->dest_proxy));
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool_t media_report_enabled(LinphoneCall * call, int stats_type){
|
||||
#if 0
|
||||
static bool_t quality_reporting_enabled(const LinphoneCall * call) {
|
||||
return (call->dest_proxy != NULL && linphone_proxy_config_quality_reporting_enabled(call->dest_proxy));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static bool_t media_report_enabled(LinphoneCall * call, int stats_type){
|
||||
if (! quality_reporting_enabled(call))
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -173,11 +177,10 @@ static bool_t media_report_enabled(LinphoneCall * call, int stats_type){
|
|||
return FALSE;
|
||||
|
||||
return (call->log->reporting.reports[stats_type] != NULL);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void append_metrics_to_buffer(char ** buffer, size_t * size, size_t * offset, const reporting_content_metrics_t *rm) {
|
||||
char * timestamps_start_str = NULL;
|
||||
char * timestamps_stop_str = NULL;
|
||||
|
|
@ -273,7 +276,9 @@ static void append_metrics_to_buffer(char ** buffer, size_t * size, size_t * off
|
|||
ms_free(moslq_str);
|
||||
ms_free(moscq_str);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static int send_report(LinphoneCall* call, reporting_session_report_t * report, const char * report_event) {
|
||||
LinphoneContent *content;
|
||||
size_t offset = 0;
|
||||
|
|
@ -408,7 +413,9 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static const SalStreamDescription * get_media_stream_for_desc(const SalMediaDescription * smd, SalStreamType sal_stream_type) {
|
||||
int count;
|
||||
if (smd != NULL) {
|
||||
|
|
@ -420,6 +427,7 @@ static const SalStreamDescription * get_media_stream_for_desc(const SalMediaDesc
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void update_ip(LinphoneCall * call, int stats_type) {
|
||||
#if 0
|
||||
|
|
@ -450,6 +458,7 @@ static void update_ip(LinphoneCall * call, int stats_type) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void qos_analyzer_on_action_suggested(void *user_data, int datac, const char** datav){
|
||||
reporting_session_report_t *report = (reporting_session_report_t*)user_data;
|
||||
LinphoneCall *call = report->call;
|
||||
|
|
@ -492,6 +501,7 @@ static void qos_analyzer_on_action_suggested(void *user_data, int datac, const c
|
|||
appendbuf=ms_strdup_printf("%s%s;", report->qos_analyzer.output?report->qos_analyzer.output:"", datav[3]);
|
||||
STR_REASSIGN(report->qos_analyzer.output, appendbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_reporting_update_ip(LinphoneCall * call) {
|
||||
update_ip(call, LINPHONE_CALL_STATS_AUDIO);
|
||||
|
|
@ -604,9 +614,11 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
|
|||
}
|
||||
|
||||
/* generate random float in interval ] 0.9 t ; 1.1 t [*/
|
||||
#if 0
|
||||
static float reporting_rand(float t){
|
||||
return t * (.2f * (rand() / (RAND_MAX * 1.0f)) + 0.9f);
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_reporting_on_rtcp_update(LinphoneCall *call, SalStreamType stats_type) {
|
||||
#if 0
|
||||
|
|
@ -718,6 +730,7 @@ int linphone_reporting_publish_interval_report(LinphoneCall* call) {
|
|||
return publish_report(call, "VQIntervalReport");
|
||||
}
|
||||
|
||||
#if 0
|
||||
static bool_t set_on_action_suggested_cb(MediaStream *stream,void (*on_action_suggested)(void*,int,const char**),void* u) {
|
||||
if (stream&&stream->rc){
|
||||
MSQosAnalyzer *analyzer=ms_bitrate_controller_get_qos_analyzer(stream->rc);
|
||||
|
|
@ -730,6 +743,7 @@ static bool_t set_on_action_suggested_cb(MediaStream *stream,void (*on_action_su
|
|||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
void linphone_reporting_call_state_updated(LinphoneCall *call){
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
// =============================================================================
|
||||
|
||||
CallSessionParamsPrivate::CallSessionParamsPrivate (const CallSessionParamsPrivate &src) {
|
||||
CallSessionParamsPrivate::CallSessionParamsPrivate (const CallSessionParamsPrivate &src) : ClonableObjectPrivate () {
|
||||
sessionName = src.sessionName;
|
||||
privacy = src.privacy;
|
||||
inConference = src.inConference;
|
||||
|
|
|
|||
|
|
@ -3571,13 +3571,13 @@ void MediaSessionPrivate::executeBackgroundTasks (bool oneSecondElapsed) {
|
|||
handleStreamEvents(mainVideoStreamIndex);
|
||||
handleStreamEvents(mainTextStreamIndex);
|
||||
|
||||
#if 0
|
||||
int disconnectTimeout = linphone_core_get_nortp_timeout(core);
|
||||
bool disconnected = false;
|
||||
if (((state == LinphoneCallStreamsRunning) || (state == LinphoneCallPausedByRemote)) && oneSecondElapsed && audioStream
|
||||
&& (audioStream->ms.state == MSStreamStarted) && (disconnectTimeout > 0)) {
|
||||
disconnected = !audio_stream_alive(audioStream, disconnectTimeout);
|
||||
}
|
||||
#if 0
|
||||
if (disconnected)
|
||||
linphone_call_lost(call);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ static void zrtp_video_call(void) {
|
|||
|
||||
static void call_state_changed_callback_to_accept_video(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState state, const char *message){
|
||||
LinphoneCoreVTable *vtable;
|
||||
if (state == LinphoneCallUpdatedByRemote){
|
||||
if (state == LinphoneCallUpdatedByRemote){
|
||||
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
|
||||
linphone_call_params_enable_video(params, TRUE);
|
||||
linphone_call_accept_update(call, params);
|
||||
|
|
@ -192,7 +192,7 @@ static LinphoneCall* _request_video(LinphoneCoreManager* caller,LinphoneCoreMana
|
|||
if (!BC_ASSERT_FALSE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(callee->lc))))){
|
||||
BC_FAIL("Video was requested while it was already active. This test doesn't look very sane.");
|
||||
}
|
||||
|
||||
|
||||
if (accept_with_params) {
|
||||
LinphoneCoreVTable *vtable = linphone_core_v_table_new();
|
||||
vtable->call_state_changed = call_state_changed_callback_to_accept_video;
|
||||
|
|
@ -227,7 +227,7 @@ bool_t request_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bo
|
|||
LinphoneVideoActivationPolicy *video_policy;
|
||||
LinphoneCall *call_obj;
|
||||
bool_t video_added = FALSE;
|
||||
|
||||
|
||||
if ((call_obj=_request_video(caller, callee, accept_with_params))){
|
||||
BC_ASSERT_TRUE(wait_for(caller->lc,callee->lc,&caller->stat.number_of_LinphoneCallUpdatedByRemote,initial_caller_stat.number_of_LinphoneCallUpdatedByRemote+1));
|
||||
BC_ASSERT_TRUE(wait_for(caller->lc,callee->lc,&callee->stat.number_of_LinphoneCallUpdating,initial_callee_stat.number_of_LinphoneCallUpdating+1));
|
||||
|
|
@ -237,7 +237,7 @@ bool_t request_video(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bo
|
|||
video_policy = linphone_core_get_video_activation_policy(caller->lc);
|
||||
if (video_policy->automatically_accept || accept_with_params) {
|
||||
video_added = BC_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(callee->lc))));
|
||||
video_added =
|
||||
video_added =
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(caller->lc))))
|
||||
&& video_added;
|
||||
} else {
|
||||
|
|
@ -302,12 +302,12 @@ static bool_t remove_video(LinphoneCoreManager *caller, LinphoneCoreManager *cal
|
|||
}
|
||||
|
||||
if ((call_obj = linphone_core_get_current_call(callee->lc))) {
|
||||
|
||||
|
||||
if (!BC_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(call_obj)))){
|
||||
BC_FAIL("Video was asked to be dropped while it was not active. This test doesn't look very sane.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
callee_params = linphone_core_create_call_params(callee->lc, call_obj);
|
||||
/* Remove video. */
|
||||
linphone_call_params_enable_video(callee_params, FALSE);
|
||||
|
|
@ -844,7 +844,7 @@ static void video_call_established_by_reinvite_with_implicit_avpf(void) {
|
|||
policy.automatically_accept=FALSE;
|
||||
|
||||
linphone_core_set_video_policy(callee->lc,&policy);
|
||||
|
||||
|
||||
policy.automatically_initiate=TRUE;
|
||||
policy.automatically_accept=TRUE;
|
||||
linphone_core_set_video_policy(caller->lc,&policy);
|
||||
|
|
@ -855,21 +855,21 @@ static void video_call_established_by_reinvite_with_implicit_avpf(void) {
|
|||
|
||||
linphone_core_enable_video_display(caller->lc, TRUE);
|
||||
linphone_core_enable_video_capture(caller->lc, TRUE);
|
||||
|
||||
|
||||
linphone_core_set_video_device(caller->lc,liblinphone_tester_mire_id);
|
||||
linphone_core_set_video_device(callee->lc,liblinphone_tester_mire_id);
|
||||
|
||||
|
||||
caller_call = linphone_core_invite_address(caller->lc, callee->identity);
|
||||
if (BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_LinphoneCallIncomingReceived,1))){
|
||||
callee_call = linphone_core_get_current_call(callee->lc);
|
||||
|
||||
|
||||
linphone_core_accept_call(callee->lc, linphone_core_get_current_call(callee->lc));
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_LinphoneCallStreamsRunning,1));
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&caller->stat.number_of_LinphoneCallStreamsRunning,1));
|
||||
|
||||
|
||||
BC_ASSERT_FALSE(linphone_call_params_video_enabled(linphone_call_get_current_params(callee_call)));
|
||||
BC_ASSERT_FALSE(linphone_call_params_video_enabled(linphone_call_get_current_params(caller_call)));
|
||||
|
||||
|
||||
/*then callee adds video*/
|
||||
params = linphone_core_create_call_params(callee->lc, callee_call);
|
||||
linphone_call_params_enable_video(params, TRUE);
|
||||
|
|
@ -879,13 +879,13 @@ static void video_call_established_by_reinvite_with_implicit_avpf(void) {
|
|||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&caller->stat.number_of_LinphoneCallUpdatedByRemote,1));
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&caller->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
|
||||
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(callee_call)));
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(caller_call)));
|
||||
|
||||
|
||||
linphone_call_set_next_video_frame_decoded_callback(caller_call,linphone_call_iframe_decoded_cb,caller->lc);
|
||||
linphone_call_set_next_video_frame_decoded_callback(callee_call,linphone_call_iframe_decoded_cb,callee->lc);
|
||||
|
||||
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_IframeDecoded,1));
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&caller->stat.number_of_IframeDecoded,1));
|
||||
|
||||
|
|
@ -894,7 +894,7 @@ static void video_call_established_by_reinvite_with_implicit_avpf(void) {
|
|||
vstream = (VideoStream *)linphone_call_get_stream(callee_call, LinphoneStreamTypeVideo);
|
||||
BC_ASSERT_TRUE(media_stream_avpf_enabled((MediaStream*)vstream));
|
||||
}
|
||||
|
||||
|
||||
end_call(caller, callee);
|
||||
linphone_core_manager_destroy(callee);
|
||||
linphone_core_manager_destroy(caller);
|
||||
|
|
@ -1000,7 +1000,7 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
|
|||
unsigned int nb_media_starts = 1;
|
||||
const LinphoneCallParams *marie_remote_params;
|
||||
const LinphoneCallParams *pauline_current_params;
|
||||
|
||||
|
||||
/*
|
||||
* Pauline is the caller
|
||||
* Marie is the callee
|
||||
|
|
@ -1027,13 +1027,13 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
|
|||
* they will not be used at the end.*/
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(pauline->lc,"Natted Linphone",NULL);
|
||||
|
||||
|
||||
linphone_core_set_audio_port(marie->lc, -1);
|
||||
linphone_core_set_video_port(marie->lc, -1);
|
||||
linphone_core_set_audio_port(pauline->lc, -1);
|
||||
linphone_core_set_video_port(pauline->lc, -1);
|
||||
|
||||
|
||||
|
||||
linphone_core_invite_address(pauline->lc, marie->identity);
|
||||
if (!BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &marie->stat.number_of_LinphoneCallIncomingReceived, 1))) goto end;
|
||||
marie_remote_params = linphone_call_get_remote_params(linphone_core_get_current_call(marie->lc));
|
||||
|
|
@ -1041,18 +1041,18 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
|
|||
if (marie_remote_params){
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(marie_remote_params) == caller_policy.automatically_initiate);
|
||||
}
|
||||
|
||||
|
||||
linphone_call_accept(linphone_core_get_current_call(marie->lc));
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 1)
|
||||
&& wait_for(pauline->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 1));
|
||||
|
||||
|
||||
pauline_current_params = linphone_call_get_current_params(linphone_core_get_current_call(pauline->lc));
|
||||
BC_ASSERT_PTR_NOT_NULL(pauline_current_params);
|
||||
if (pauline_current_params){
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(pauline_current_params) ==
|
||||
BC_ASSERT_TRUE(linphone_call_params_video_enabled(pauline_current_params) ==
|
||||
(caller_policy.automatically_initiate && callee_policy.automatically_accept));
|
||||
}
|
||||
|
||||
|
||||
/* Wait for ICE reINVITEs to complete. */
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2)
|
||||
&& wait_for(pauline->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 2));
|
||||
|
|
@ -1063,8 +1063,8 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
|
|||
}
|
||||
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
|
||||
BC_ASSERT_TRUE(check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts));
|
||||
|
||||
|
||||
|
||||
|
||||
if (caller_policy.automatically_initiate && callee_policy.automatically_accept && (video_added_by_caller || video_added_by_callee)){
|
||||
BC_FAIL("Tired developer detected. You have requested the test to add video while it is already established from the beginning of the call.");
|
||||
}else{
|
||||
|
|
@ -1095,7 +1095,7 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
|
|||
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
|
||||
nb_media_starts++;
|
||||
BC_ASSERT_TRUE(check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts));
|
||||
|
||||
|
||||
}
|
||||
|
||||
end_call(pauline, marie);
|
||||
|
|
@ -1332,7 +1332,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
|
|||
|
||||
/*The send-only client shall set rtp symmetric in absence of media relay for this test.*/
|
||||
lp_config_set_int(marie->lc->config,"rtp","symmetric",1);
|
||||
|
||||
|
||||
linphone_call_set_next_video_frame_decoded_callback(linphone_core_invite_address(pauline->lc,marie->identity)
|
||||
,linphone_call_iframe_decoded_cb
|
||||
,pauline->lc);
|
||||
|
|
@ -1605,15 +1605,15 @@ static void classic_video_entry_phone_setup(void) {
|
|||
linphone_core_set_avpf_mode(callee_mgr->lc, LinphoneAVPFEnabled);
|
||||
linphone_core_set_video_policy(caller_mgr->lc, &vpol);
|
||||
linphone_core_set_video_policy(callee_mgr->lc, &vpol);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// important: VP8 has really poor performances with the mire camera, at least
|
||||
// on iOS - so when ever h264 is available, let's use it instead
|
||||
if (linphone_core_find_payload_type(caller_mgr->lc,"h264", -1, -1)!=NULL) {
|
||||
disable_all_video_codecs_except_one(caller_mgr->lc,"h264");
|
||||
disable_all_video_codecs_except_one(callee_mgr->lc,"h264");
|
||||
|
||||
|
||||
/*On Mac OS, set VGA as the prefered size, otherwise we don't benefit from the hardware
|
||||
* accelerated H264 videotoolbox codec*/
|
||||
if (ms_factory_get_encoder(linphone_core_get_ms_factory(callee_mgr->lc), "H264")->id == MS_VT_H264_ENC_ID){
|
||||
|
|
@ -1857,7 +1857,7 @@ static void incoming_reinvite_with_invalid_ack_sdp(void){
|
|||
BC_ASSERT_FALSE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(callee->lc))));
|
||||
caller_params = linphone_call_get_current_params(linphone_core_get_current_call(caller->lc));
|
||||
// TODO [refactoring]: BC_ASSERT_TRUE(wait_for(caller->lc,callee->lc,(int*)&caller_params->has_video,FALSE));
|
||||
|
||||
(void)caller_params;
|
||||
sal_call_set_sdp_handling(linphone_call_get_op(inc_call), SalOpSDPNormal);
|
||||
}
|
||||
end_call(caller, callee);
|
||||
|
|
@ -1958,40 +1958,40 @@ static void call_with_early_media_and_no_sdp_in_200_with_video(void){
|
|||
|
||||
|
||||
/*
|
||||
* This test simulates a network congestion in the video flow from marie to pauline.
|
||||
* This test simulates a network congestion in the video flow from marie to pauline.
|
||||
* The stream from pauline to marie is not under test.
|
||||
* It checks that a first TMMBR consecutive to congestion detection is received, and a second one after congestion resolution is received
|
||||
* It checks that a first TMMBR consecutive to congestion detection is received, and a second one after congestion resolution is received
|
||||
* a few seconds later.
|
||||
* The parameters used for the network simulator correspond to a "light congestion", which are the ones that translate into relatively
|
||||
* small packet losses, hence the more difficult to detect at first sight.
|
||||
*
|
||||
*
|
||||
**/
|
||||
static void video_call_with_thin_congestion(void){
|
||||
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
||||
LinphoneVideoPolicy pol = {0};
|
||||
OrtpNetworkSimulatorParams simparams = { 0 };
|
||||
|
||||
|
||||
linphone_core_set_video_device(marie->lc, "Mire: Mire (synthetic moving picture)");
|
||||
linphone_core_enable_video_capture(marie->lc, TRUE);
|
||||
linphone_core_enable_video_display(marie->lc, TRUE);
|
||||
linphone_core_enable_video_capture(pauline->lc, TRUE);
|
||||
linphone_core_enable_video_display(pauline->lc, TRUE);
|
||||
|
||||
|
||||
pol.automatically_accept = TRUE;
|
||||
pol.automatically_initiate = TRUE;
|
||||
linphone_core_set_video_policy(marie->lc, &pol);
|
||||
linphone_core_set_video_policy(pauline->lc, &pol);
|
||||
|
||||
|
||||
linphone_core_set_preferred_video_size_by_name(marie->lc, "vga");
|
||||
simparams.mode = OrtpNetworkSimulatorOutbound;
|
||||
simparams.enabled = TRUE;
|
||||
simparams.max_bandwidth = 400000;
|
||||
simparams.max_buffer_size = (int)simparams.max_bandwidth;
|
||||
simparams.latency = 60;
|
||||
|
||||
|
||||
linphone_core_set_network_simulator_params(marie->lc, &simparams);
|
||||
|
||||
|
||||
if (BC_ASSERT_TRUE(call(marie, pauline))){
|
||||
LinphoneCall *call = linphone_core_get_current_call(pauline->lc);
|
||||
int first_tmmbr;
|
||||
|
|
@ -2001,12 +2001,12 @@ static void video_call_with_thin_congestion(void){
|
|||
BC_ASSERT_GREATER((float)marie->stat.last_tmmbr_value_received, 220000.f, float, "%f");
|
||||
BC_ASSERT_LOWER((float)marie->stat.last_tmmbr_value_received, 300000.f, float, "%f");
|
||||
first_tmmbr = marie->stat.last_tmmbr_value_received;
|
||||
|
||||
|
||||
/*another tmmbr with a greater value is expected once the congestion is resolved*/
|
||||
BC_ASSERT_TRUE(wait_for_until(marie->lc, pauline->lc, &marie->stat.last_tmmbr_value_received, first_tmmbr + 1, 15000));
|
||||
BC_ASSERT_GREATER((float)marie->stat.last_tmmbr_value_received, 290000.f, float, "%f");
|
||||
BC_ASSERT_GREATER(linphone_call_get_current_quality(call), 4.f, float, "%f");
|
||||
|
||||
|
||||
end_call(marie, pauline);
|
||||
}
|
||||
linphone_core_manager_destroy(marie);
|
||||
|
|
|
|||
|
|
@ -691,12 +691,13 @@ static void call_with_sips_not_achievable(void){
|
|||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
static bool_t is_sending_ipv6(RtpSession *session, bool_t rtcp){
|
||||
const struct sockaddr *dest = rtcp ? (struct sockaddr*)&session->rtcp.gs.rem_addr : (struct sockaddr*)&session->rtp.gs.rem_addr;
|
||||
struct sockaddr_in6 *in6=(struct sockaddr_in6*)dest;
|
||||
return dest->sa_family == AF_INET6 && !IN6_IS_ADDR_V4MAPPED(&in6->sin6_addr);
|
||||
}
|
||||
#endif
|
||||
static bool_t is_remote_contact_ipv6(LinphoneCall *call){
|
||||
const char *contact=linphone_call_get_remote_contact(call);
|
||||
LinphoneAddress *ct_addr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue