Commit 683d30fa authored by Ghislain MARY's avatar Ghislain MARY

Restore some asserts in call tests.

parent af991443
......@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "chat/chat-room/chat-room.h"
#include "core/core.h"
#include "c-wrapper/c-wrapper.h"
#include "conference/session/media-session-p.h"
using namespace std;
......@@ -108,3 +109,48 @@ int linphone_friend_list_get_revision(const LinphoneFriendList *lfl) {
unsigned int _linphone_call_get_nb_media_starts (const LinphoneCall *call) {
return L_GET_PRIVATE_FROM_C_OBJECT(call)->getMediaStartCount();
}
belle_sip_source_t *_linphone_call_get_dtmf_timer (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getDtmfTimer();
}
bool_t _linphone_call_has_dtmf_sequence (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getDtmfSequence().empty() ? FALSE : TRUE;
}
SalMediaDescription *_linphone_call_get_local_desc (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getLocalDesc();
}
SalMediaDescription *_linphone_call_get_result_desc (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getResultDesc();
}
MSWebCam *_linphone_call_get_video_device (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getVideoDevice();
}
void _linphone_call_add_local_desc_changed_flag (LinphoneCall *call, int flag) {
L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->addLocalDescChangedFlag(flag);
}
int _linphone_call_get_main_audio_stream_index (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getMainAudioStreamIndex();
}
int _linphone_call_get_main_text_stream_index (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getMainTextStreamIndex();
}
int _linphone_call_get_main_video_stream_index (const LinphoneCall *call) {
return L_GET_PRIVATE(static_pointer_cast<LinphonePrivate::MediaSession>(
L_GET_PRIVATE_FROM_C_OBJECT(call)->getActiveSession()))->getMainVideoStreamIndex();
}
......@@ -83,6 +83,15 @@ LINPHONE_PUBLIC MediaStream * linphone_call_get_stream(LinphoneCall *call, Linph
LINPHONE_PUBLIC bool_t linphone_call_get_all_muted(const LinphoneCall *call);
LINPHONE_PUBLIC LinphoneProxyConfig * linphone_call_get_dest_proxy(const LinphoneCall *call);
LINPHONE_PUBLIC unsigned int _linphone_call_get_nb_media_starts (const LinphoneCall *call);
LINPHONE_PUBLIC belle_sip_source_t *_linphone_call_get_dtmf_timer (const LinphoneCall *call);
LINPHONE_PUBLIC bool_t _linphone_call_has_dtmf_sequence (const LinphoneCall *call);
LINPHONE_PUBLIC SalMediaDescription *_linphone_call_get_local_desc (const LinphoneCall *call);
LINPHONE_PUBLIC SalMediaDescription *_linphone_call_get_result_desc (const LinphoneCall *call);
LINPHONE_PUBLIC MSWebCam *_linphone_call_get_video_device (const LinphoneCall *call);
LINPHONE_PUBLIC void _linphone_call_add_local_desc_changed_flag (LinphoneCall *call, int flag);
LINPHONE_PUBLIC int _linphone_call_get_main_audio_stream_index (const LinphoneCall *call);
LINPHONE_PUBLIC int _linphone_call_get_main_text_stream_index (const LinphoneCall *call);
LINPHONE_PUBLIC int _linphone_call_get_main_video_stream_index (const LinphoneCall *call);
LINPHONE_PUBLIC void linphone_call_params_set_no_user_consent(LinphoneCallParams *params, bool_t value);
LINPHONE_PUBLIC bool_t linphone_call_params_get_update_call_when_ice_completed(const LinphoneCallParams *params);
......
......@@ -93,11 +93,21 @@ public:
int getStreamIndex (LinphoneStreamType type) const;
int getStreamIndex (MediaStream *ms) const;
SalCallOp * getOp () const { return op; }
MSWebCam *getVideoDevice () const;
void setAudioMuted (bool value) { audioMuted = value; }
void initializeStreams ();
void stopStreams ();
// Methods used by testers
void addLocalDescChangedFlag (int flag) { localDescChanged |= flag; }
belle_sip_source_t *getDtmfTimer () const { return dtmfTimer; }
const std::string &getDtmfSequence () const { return dtmfSequence; }
int getMainAudioStreamIndex () const { return mainAudioStreamIndex; }
int getMainTextStreamIndex () const { return mainTextStreamIndex; }
int getMainVideoStreamIndex () const { return mainVideoStreamIndex; }
SalMediaDescription *getResultDesc () const { return resultDesc; }
// CoreListener
void onNetworkReachable (bool reachable) override;
......@@ -129,7 +139,6 @@ private:
OrtpEvQueue *getEventQueue (int streamIndex) const;
MediaStream *getMediaStream (int streamIndex) const;
MSWebCam *getVideoDevice () const;
void fillMulticastMediaAddresses ();
int selectFixedPort (int streamIndex, std::pair<int, int> portRange);
......
......@@ -566,6 +566,20 @@ int MediaSessionPrivate::getStreamIndex (MediaStream *ms) const {
return -1;
}
MSWebCam * MediaSessionPrivate::getVideoDevice () const {
L_Q();
bool paused = (state == LinphoneCallPausing) || (state == LinphoneCallPaused);
if (paused || allMuted || !cameraEnabled)
#ifdef VIDEO_ENABLED
return ms_web_cam_manager_get_cam(ms_factory_get_web_cam_manager(q->getCore()->getCCore()->factory),
"StaticImage: Static picture");
#else
return nullptr;
#endif
else
return q->getCore()->getCCore()->video_conf.device;
}
// -----------------------------------------------------------------------------
void MediaSessionPrivate::initializeStreams () {
......@@ -972,20 +986,6 @@ MediaStream * MediaSessionPrivate::getMediaStream (int streamIndex) const {
return nullptr;
}
MSWebCam * MediaSessionPrivate::getVideoDevice () const {
L_Q();
bool paused = (state == LinphoneCallPausing) || (state == LinphoneCallPaused);
if (paused || allMuted || !cameraEnabled)
#ifdef VIDEO_ENABLED
return ms_web_cam_manager_get_cam(ms_factory_get_web_cam_manager(q->getCore()->getCCore()->factory),
"StaticImage: Static picture");
#else
return nullptr;
#endif
else
return q->getCore()->getCCore()->video_conf.device;
}
// -----------------------------------------------------------------------------
void MediaSessionPrivate::fillMulticastMediaAddresses () {
......
......@@ -2132,9 +2132,8 @@ void call_paused_resumed_base(bool_t multicast, bool_t with_losses) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline;
#if 0
RtpSession *rtp_session;
const rtp_stats_t * stats;
#endif
bool_t call_ok;
linphone_core_enable_audio_multicast(pauline->lc,multicast);
......@@ -2173,12 +2172,11 @@ void call_paused_resumed_base(bool_t multicast, bool_t with_losses) {
wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000);
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
#if 0
if (BC_ASSERT_PTR_NOT_NULL(call_pauline->sessions->rtp_session)) {
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
rtp_session = linphone_call_get_stream(call_pauline, LinphoneStreamTypeAudio)->sessions.rtp_session;
if (BC_ASSERT_PTR_NOT_NULL(rtp_session)) {
stats = rtp_session_get_stats(rtp_session);
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
}
#endif
if (with_losses) {
/* now we want to loose the ack*/
......@@ -2213,9 +2211,7 @@ static void call_paused_by_both(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline, *call_marie;
#if 0
const rtp_stats_t * stats;
#endif
bctbx_list_t *lcs = NULL;
bool_t call_ok;
......@@ -2266,10 +2262,8 @@ static void call_paused_by_both(void) {
wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000);
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
#if 0
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
stats = rtp_session_get_stats(linphone_call_get_stream(call_pauline, LinphoneStreamTypeAudio)->sessions.rtp_session);
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
#endif
end_call(marie, pauline);
......@@ -2395,9 +2389,7 @@ static void call_paused_resumed_from_callee(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_marie;
#if 0
const rtp_stats_t * stats;
#endif
bool_t call_ok;
BC_ASSERT_TRUE((call_ok=call(pauline,marie)));
......@@ -2419,10 +2411,8 @@ static void call_paused_resumed_from_callee(void) {
wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000);
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
#if 0
stats = rtp_session_get_stats(call_marie->sessions->rtp_session);
stats = rtp_session_get_stats(linphone_call_get_stream(call_marie, LinphoneStreamTypeAudio)->sessions.rtp_session);
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
#endif
end_call(pauline, marie);
end:
......@@ -3122,11 +3112,9 @@ static void early_media_call_with_ringing_base(bool_t network_change){
/* this is a hack to simulate an incoming OK with a different IP address
* in the 'c' SDP field. */
#if 0
if (network_change) {
marie_call->localdesc_changed |= SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED;
_linphone_call_add_local_desc_changed_flag(marie_call, SAL_MEDIA_DESCRIPTION_NETWORK_CHANGED);
}
#endif
linphone_call_accept(linphone_core_get_current_call(pauline->lc));
......@@ -4728,9 +4716,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline = NULL;
LinphoneCall* call_marie = NULL;
#if 0
const rtp_stats_t * stats;
#endif
bool_t call_ok;
LinphoneCoreVTable * v_table;
RtpTransportModifier *rtptm_marie = NULL;
......@@ -4798,10 +4784,8 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000);
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
#if 0
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
stats = rtp_session_get_stats(linphone_call_get_stream(call_pauline, LinphoneStreamTypeAudio)->sessions.rtp_session);
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
#endif
end_call(pauline, marie);
} else if (recordTest) {
......@@ -5843,12 +5827,10 @@ static void call_with_ice_with_default_candidate_not_stun(void){
call_ok = call(marie, pauline);
if (call_ok){
check_ice(marie, pauline, LinphoneIceStateHostConnection);
#if 0
BC_ASSERT_STRING_EQUAL(marie->lc->current_call->localdesc->addr, localip);
BC_ASSERT_STRING_EQUAL(pauline->lc->current_call->resultdesc->addr, localip);
BC_ASSERT_STRING_EQUAL(marie->lc->current_call->localdesc->streams[0].rtp_addr, localip);
BC_ASSERT_STRING_EQUAL(pauline->lc->current_call->resultdesc->streams[0].rtp_addr, "");
#endif
BC_ASSERT_STRING_EQUAL(_linphone_call_get_local_desc(linphone_core_get_current_call(marie->lc))->addr, localip);
BC_ASSERT_STRING_EQUAL(_linphone_call_get_result_desc(linphone_core_get_current_call(pauline->lc))->addr, localip);
BC_ASSERT_STRING_EQUAL(_linphone_call_get_local_desc(linphone_core_get_current_call(marie->lc))->streams[0].rtp_addr, localip);
BC_ASSERT_STRING_EQUAL(_linphone_call_get_result_desc(linphone_core_get_current_call(pauline->lc))->streams[0].rtp_addr, "");
}
end_call(marie, pauline);
linphone_core_manager_destroy(marie);
......
......@@ -92,10 +92,8 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack
wait_for_until(pauline->lc, marie->lc, NULL, 5, 2000);
/*check if video stream is still offered even if disabled*/
#if 0
BC_ASSERT_EQUAL(call_pauline->localdesc->nb_streams, 2, int, "%i");
BC_ASSERT_EQUAL(call_marie->localdesc->nb_streams, 2, int, "%i");
#endif
BC_ASSERT_EQUAL(_linphone_call_get_local_desc(call_pauline)->nb_streams, 2, int, "%i");
BC_ASSERT_EQUAL(_linphone_call_get_local_desc(call_marie)->nb_streams, 2, int, "%i");
linphone_core_enable_sdp_200_ack(pauline->lc,sdp_200_ack);
......@@ -616,6 +614,8 @@ void video_call_base_2(LinphoneCoreManager* caller,LinphoneCoreManager* callee,
static void check_fir(LinphoneCoreManager* caller,LinphoneCoreManager* callee ){
LinphoneCall* callee_call;
LinphoneCall* caller_call;
VideoStream *callee_vstream;
VideoStream *caller_vstream;
callee_call=linphone_core_get_current_call(callee->lc);
caller_call=linphone_core_get_current_call(caller->lc);
......@@ -630,31 +630,26 @@ static void check_fir(LinphoneCoreManager* caller,LinphoneCoreManager* callee ){
linphone_call_send_vfu_request(callee_call);
#if 0
if (rtp_session_avpf_enabled(callee_call->sessions->rtp_session)){
BC_ASSERT_TRUE(wait_for(callee->lc,caller->lc,&caller_call->videostream->ms_video_stat.counter_rcvd_fir, 1));
}else{
BC_ASSERT_TRUE(wait_for(callee->lc,caller->lc,&caller_call->videostream->ms_video_stat.counter_rcvd_fir, 0));
}
ms_message ("check_fir : [%p] received %d FIR ",&caller_call ,caller_call->videostream->ms_video_stat.counter_rcvd_fir);
ms_message ("check_fir : [%p] stat number of iframe decoded %d ",&callee_call, callee->stat.number_of_IframeDecoded);
#endif
callee_vstream = (VideoStream *)linphone_call_get_stream(callee_call, LinphoneStreamTypeVideo);
caller_vstream = (VideoStream *)linphone_call_get_stream(caller_call, LinphoneStreamTypeVideo);
if (media_stream_avpf_enabled(&callee_vstream->ms))
BC_ASSERT_TRUE(wait_for(callee->lc, caller->lc, &caller_vstream->ms_video_stat.counter_rcvd_fir, 1));
else
BC_ASSERT_TRUE(wait_for(callee->lc, caller->lc, &caller_vstream->ms_video_stat.counter_rcvd_fir, 0));
ms_message("check_fir: [%p] received %d FIR ",&caller_call ,caller_vstream->ms_video_stat.counter_rcvd_fir);
ms_message("check_fir: [%p] stat number of iframe decoded %d ",&callee_call, callee->stat.number_of_IframeDecoded);
linphone_call_set_next_video_frame_decoded_callback(caller_call,linphone_call_iframe_decoded_cb,caller->lc);
linphone_call_send_vfu_request(caller_call);
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&caller->stat.number_of_IframeDecoded,1));
#if 0
if (rtp_session_avpf_enabled(caller_call->sessions->rtp_session)) {
if (rtp_session_avpf_enabled(callee_call->sessions->rtp_session)){
BC_ASSERT_TRUE(wait_for(callee->lc,caller->lc,&callee_call->videostream->ms_video_stat.counter_rcvd_fir, 1));
}
}else{
BC_ASSERT_TRUE(wait_for(callee->lc,caller->lc,&callee_call->videostream->ms_video_stat.counter_rcvd_fir, 0));
}
ms_message ("check_fir : [%p] received %d FIR ",&callee_call ,callee_call->videostream->ms_video_stat.counter_rcvd_fir);
ms_message ("check_fir : [%p] stat number of iframe decoded %d ",&caller_call, caller->stat.number_of_IframeDecoded);
#endif
if (media_stream_avpf_enabled(&caller_vstream->ms)) {
if (media_stream_avpf_enabled(&callee_vstream->ms))
BC_ASSERT_TRUE(wait_for(callee->lc, caller->lc, &callee_vstream->ms_video_stat.counter_rcvd_fir, 1));
} else
BC_ASSERT_TRUE(wait_for(callee->lc, caller->lc, &callee_vstream->ms_video_stat.counter_rcvd_fir, 0));
ms_message("check_fir: [%p] received %d FIR ", &callee_call, callee_vstream->ms_video_stat.counter_rcvd_fir);
ms_message("check_fir: [%p] stat number of iframe decoded %d ", &caller_call, caller->stat.number_of_IframeDecoded);
}
void video_call_base_3(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled) {
......
......@@ -178,11 +178,9 @@ static void call_with_audio_mline_before_video_in_sdp(void) {
if (call) {
linphone_call_accept(call);
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallStreamsRunning, 1));
#if 0
BC_ASSERT_EQUAL(call->main_audio_stream_index, 0, int, "%d");
BC_ASSERT_EQUAL(call->main_video_stream_index, 1, int, "%d");
BC_ASSERT_TRUE(call->main_text_stream_index > 1);
#endif
BC_ASSERT_EQUAL(_linphone_call_get_main_audio_stream_index(call), 0, int, "%d");
BC_ASSERT_EQUAL(_linphone_call_get_main_video_stream_index(call), 1, int, "%d");
BC_ASSERT_TRUE(_linphone_call_get_main_text_stream_index(call) > 1);
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(call)));
check_rtcp(call);
......@@ -221,11 +219,9 @@ static void call_with_video_mline_before_audio_in_sdp(void) {
if (call) {
linphone_call_accept(call);
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallStreamsRunning, 1));
#if 0
BC_ASSERT_EQUAL(call->main_audio_stream_index, 1, int, "%d");
BC_ASSERT_EQUAL(call->main_video_stream_index, 0, int, "%d");
BC_ASSERT_TRUE(call->main_text_stream_index > 1);
#endif
BC_ASSERT_EQUAL(_linphone_call_get_main_audio_stream_index(call), 1, int, "%d");
BC_ASSERT_EQUAL(_linphone_call_get_main_video_stream_index(call), 0, int, "%d");
BC_ASSERT_TRUE(_linphone_call_get_main_text_stream_index(call) > 1);
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(call)));
check_rtcp(call);
......@@ -264,11 +260,9 @@ static void call_with_multiple_audio_mline_in_sdp(void) {
if (call) {
linphone_call_accept(call);
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallStreamsRunning, 1));
#if 0
BC_ASSERT_EQUAL(call->main_audio_stream_index, 0, int, "%d");
BC_ASSERT_EQUAL(call->main_video_stream_index, 2, int, "%d");
BC_ASSERT_TRUE(call->main_text_stream_index > 2);
#endif
BC_ASSERT_EQUAL(_linphone_call_get_main_audio_stream_index(call), 0, int, "%d");
BC_ASSERT_EQUAL(_linphone_call_get_main_video_stream_index(call), 2, int, "%d");
BC_ASSERT_TRUE(_linphone_call_get_main_text_stream_index(call) > 2);
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(call)));
check_rtcp(call);
......@@ -307,11 +301,9 @@ static void call_with_multiple_video_mline_in_sdp(void) {
if (call) {
linphone_call_accept(call);
BC_ASSERT_TRUE(wait_for(mgr->lc, mgr->lc, &mgr->stat.number_of_LinphoneCallStreamsRunning, 1));
#if 0
BC_ASSERT_EQUAL(call->main_audio_stream_index, 0, int, "%d");
BC_ASSERT_EQUAL(call->main_video_stream_index, 1, int, "%d");
BC_ASSERT_TRUE(call->main_text_stream_index > 3);
#endif
BC_ASSERT_EQUAL(_linphone_call_get_main_audio_stream_index(call), 0, int, "%d");
BC_ASSERT_EQUAL(_linphone_call_get_main_video_stream_index(call), 1, int, "%d");
BC_ASSERT_TRUE(_linphone_call_get_main_text_stream_index(call) > 3);
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(call)));
check_rtcp(call);
......
......@@ -92,10 +92,8 @@ void send_dtmf_base(LinphoneCoreManager **pmarie, LinphoneCoreManager **ppauline
void send_dtmf_cleanup(LinphoneCoreManager *marie, LinphoneCoreManager *pauline) {
LinphoneCall *marie_call = linphone_core_get_current_call(marie->lc);
if (marie_call) {
#if 0
BC_ASSERT_PTR_NULL(marie_call->dtmfs_timer);
BC_ASSERT_PTR_NULL(marie_call->dtmf_sequence);
#endif
BC_ASSERT_PTR_NULL(_linphone_call_get_dtmf_timer(marie_call));
BC_ASSERT_FALSE(_linphone_call_has_dtmf_sequence(marie_call));
/*just to sleep*/
linphone_core_terminate_all_calls(pauline->lc);
......
......@@ -691,13 +691,12 @@ 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;
......@@ -749,12 +748,10 @@ static void _call_with_ipv6(bool_t caller_with_ipv6, bool_t callee_with_ipv6) {
BC_ASSERT_EQUAL(is_remote_contact_ipv6(marie_call), callee_with_ipv6, int, "%i");
/*check that the RTP destinations are IPv6 (flexisip should propose an IPv6 relay for parties with IPv6)*/
#if 0
BC_ASSERT_EQUAL(is_sending_ipv6(marie_call->sessions[0].rtp_session, FALSE), caller_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(marie_call->sessions[0].rtp_session, TRUE), caller_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(pauline_call->sessions[0].rtp_session, FALSE), callee_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(pauline_call->sessions[0].rtp_session, TRUE), callee_with_ipv6, int, "%i");
#endif
BC_ASSERT_EQUAL(is_sending_ipv6(linphone_call_get_stream(marie_call, LinphoneStreamTypeAudio)->sessions.rtp_session, FALSE), caller_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(linphone_call_get_stream(marie_call, LinphoneStreamTypeAudio)->sessions.rtp_session, TRUE), caller_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(linphone_call_get_stream(pauline_call, LinphoneStreamTypeAudio)->sessions.rtp_session, FALSE), callee_with_ipv6, int, "%i");
BC_ASSERT_EQUAL(is_sending_ipv6(linphone_call_get_stream(pauline_call, LinphoneStreamTypeAudio)->sessions.rtp_session, TRUE), callee_with_ipv6, int, "%i");
}
liblinphone_tester_check_rtcp(marie,pauline);
......
......@@ -425,8 +425,8 @@ static void check_avpf_features(LinphoneCore *lc, unsigned char expected_feature
LinphoneCall *lcall = linphone_core_get_current_call(lc);
BC_ASSERT_PTR_NOT_NULL(lcall);
if (lcall != NULL) {
#if 0
SalStreamDescription *desc = sal_media_description_find_stream(lcall->resultdesc, SalProtoRtpAvpf, SalVideo);
SalMediaDescription *resultDesc = _linphone_call_get_result_desc(lcall);
SalStreamDescription *desc = sal_media_description_find_stream(resultDesc, SalProtoRtpAvpf, SalVideo);
BC_ASSERT_PTR_NOT_NULL(desc);
if (desc != NULL) {
BC_ASSERT_PTR_NOT_NULL(desc->payloads);
......@@ -436,7 +436,6 @@ static void check_avpf_features(LinphoneCore *lc, unsigned char expected_feature
BC_ASSERT_EQUAL(pt->avpf.features, expected_features, int, "%d");
}
}
#endif
}
}
......
......@@ -576,15 +576,11 @@ static void enable_disable_camera_after_camera_switches(void) {
if(call != NULL) {
linphone_call_update(call, NULL);
}
#if 0
BC_ASSERT_STRING_EQUAL(newCamId,ms_web_cam_get_string_id(linphone_call_get_video_device(call)));
#endif
BC_ASSERT_STRING_EQUAL(newCamId,ms_web_cam_get_string_id(_linphone_call_get_video_device(call)));
linphone_call_enable_camera(call,FALSE);
linphone_core_iterate(marie->lc);
linphone_call_enable_camera(call,TRUE);
#if 0
BC_ASSERT_STRING_EQUAL(newCamId,ms_web_cam_get_string_id(linphone_call_get_video_device(call)));
#endif
BC_ASSERT_STRING_EQUAL(newCamId,ms_web_cam_get_string_id(_linphone_call_get_video_device(call)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment