• Andrea Gianarda's avatar
    Conference Factory URI: · 3a43603e
    Andrea Gianarda authored
       Set it as Address in account parameters and core in order to easily
       take advantage of address comparison, parameter management and
       compliance with RFC3261
    
    Conference:
      Allow applications to directly mute licrophone and get input device
      volume through the conference object.
      This will ensure that whatever type of confenrece is and regardless if the
      device is hosting or being a participant, the application will have only
      one interface to use and the SDK will work under the hood.
    
    Deprecated methods:
      Delete linphone_core_mute_mic and linphone_core_is_mic_muted
      Add LINPHONE_DEPRECATED to deprecated Account parameter methods
    
    Tester:
      Pass conference factory uri to ClientConference constructor instead of
      focus identity
    
    Memory leaks:
      Free data of list returned by linphone_friend_get_phone_numbers
    3a43603e
audio_video_conference_tester.c 633.29 KiB
/*
 * Copyright (c) 2010-2022 Belledonne Communications SARL.
 * This file is part of Liblinphone
 * (see https://gitlab.linphone.org/BC/public/liblinphone).
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "belle-sip/sipstack.h"
#include "liblinphone_tester.h"
#include "linphone/core.h"
#include "linphone/lpconfig.h"
#include "mediastreamer2/msanalysedisplay.h"
#include "mediastreamer2/msmire.h"
#include "mediastreamer2/msutils.h"
#include "mediastreamer2/msvolume.h"
#include "shared_tester_functions.h"
#include "tester_utils.h"
#include <sys/stat.h>
#include <sys/types.h>
#ifdef _WIN32
#define unlink _unlink
#endif
void destroy_mgr_in_conference(LinphoneCoreManager *mgr) {
	if (mgr->user_info) {
		ms_free((int *)mgr->user_info);
	linphone_core_manager_destroy(mgr);
static void set_video_in_call(LinphoneCoreManager *m1,
                              LinphoneCoreManager *m2,
                              bool_t enable_video,
                              bctbx_list_t *participants,
                              const LinphoneAddress *conference_address) {
	ms_message("%s %s video in call with %s", linphone_core_get_identity(m1->lc),
	           ((enable_video) ? "enables" : "disables"), linphone_core_get_identity(m2->lc));
	LinphoneConference *m1_conference = linphone_core_search_conference(m1->lc, NULL, NULL, conference_address, NULL);
	BC_ASSERT_PTR_NOT_NULL(m1_conference);
	bool_t expected_m1_video_capability = FALSE;
	if (m1_conference) {
		const LinphoneConferenceParams *params = linphone_conference_get_current_params(m1_conference);
		expected_m1_video_capability = linphone_conference_params_video_enabled(params);
		BC_ASSERT_TRUE(linphone_conference_is_in(m1_conference) ==
		               linphone_conference_params_local_participant_enabled(params));
	LinphoneConference *m2_conference = linphone_core_search_conference(m2->lc, NULL, NULL, conference_address, NULL);
	BC_ASSERT_PTR_NOT_NULL(m2_conference);
	bool_t expected_m2_video_capability = FALSE;
	if (m2_conference) {
		const LinphoneConferenceParams *params = linphone_conference_get_current_params(m2_conference);
		expected_m2_video_capability = linphone_conference_params_video_enabled(params);