mumsi/main.cpp

52 lines
1.4 KiB
C++
Raw Normal View History

2015-09-29 02:26:45 +02:00
#include "log4cpp/Category.hh"
#include "log4cpp/Appender.hh"
#include "log4cpp/FileAppender.hh"
#include "log4cpp/OstreamAppender.hh"
#include "log4cpp/Layout.hh"
#include "log4cpp/BasicLayout.hh"
#include "log4cpp/Priority.hh"
#include "PjsuaCommunicator.hpp"
#include "MumbleCommunicator.hpp"
2015-07-13 18:14:35 +02:00
2015-09-29 02:26:45 +02:00
#include "SoundSampleQueue.hpp"
2015-07-13 18:14:35 +02:00
#define SIP_DOMAIN "sip.antisip.com"
#define SIP_USER "melangtone"
#define SIP_PASSWD "b8DU9AZXbd9tVCWg"
2015-07-13 18:14:35 +02:00
#define MUMBLE_DOMAIN "1con.pl"
#define MUMBLE_USER "mumsi"
#define MUMBLE_PASSWD "kiwi"
2015-07-13 18:14:35 +02:00
int main(int argc, char *argv[]) {
2015-09-29 02:26:45 +02:00
log4cpp::Appender *appender1 = new log4cpp::OstreamAppender("console", &std::cout);
appender1->setLayout(new log4cpp::BasicLayout());
log4cpp::Category &logger = log4cpp::Category::getRoot();
logger.setPriority(log4cpp::Priority::DEBUG);
logger.addAppender(appender1);
2015-09-29 02:26:45 +02:00
SoundSampleQueue<int16_t> mumbleToSipQueue;
SoundSampleQueue<int16_t> sipToMumbleQueue;
2015-07-13 18:14:35 +02:00
2015-09-29 02:26:45 +02:00
mumble::MumbleCommunicator mumbleCommunicator(
sipToMumbleQueue,
mumbleToSipQueue,
MUMBLE_USER, MUMBLE_PASSWD, MUMBLE_DOMAIN);
2015-09-29 02:26:45 +02:00
pjsua::PjsuaCommunicator pjsuaCommunicator(
mumbleToSipQueue,
sipToMumbleQueue,
SIP_DOMAIN, SIP_USER, SIP_PASSWD);
2015-09-29 02:26:45 +02:00
logger.info("Application started.");
2015-07-13 18:14:35 +02:00
2015-09-29 02:26:45 +02:00
pjsuaCommunicator.loop();
2015-07-13 18:14:35 +02:00
2015-09-29 02:26:45 +02:00
mumbleCommunicator.loop();
2015-07-13 18:14:35 +02:00
return 0;
2015-07-13 18:14:35 +02:00
}