audio-quality-tester.cpp 22.50 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 <map>
#include <vector>
#include <bctoolbox/defs.h>
#include "address/address.h"
#include "chat/chat-message/chat-message.h"
#include "chat/chat-room/basic-chat-room.h"
#include "content/content-type.h"
#include "content/content.h"
#include "content/file-content.h"
#include "core/core.h"
// TODO: Remove me later.
#include "liblinphone_tester.h"
#include "private.h"
#include "tester_utils.h"
// =============================================================================
using namespace std;
using namespace LinphonePrivate;
class FmtpManager {
public:
	FmtpManager() {
	void setFmtp(const std::string &key, const std::string &value) {
		mFmtp[key] = value;
	std::string toString() {
		return toString(mFmtp);
	std::string toString(std::map<std::string, std::string> data) {
		std::string merge;
		for (auto i : data) {
			if (merge != "") merge += ';';
			if (i.second != "") merge += i.first + "=" + i.second;
			else merge += i.first;
		return merge;
	std::map<std::string, std::string> mFmtp;
#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(__ANDROID__)
static void completion_cb(BCTBX_UNUSED(void *user_data), int percentage) {
	fprintf(stdout, "%i %% completed\r", percentage);
	fflush(stdout);
#endif