#define MS_CLASS "mediasoup-worker"
#include "common.hpp"
#include "Logger.hpp"
#include "lib.hpp"
#include <cstdlib>
#include <string>
static constexpr int ConsumerChannelFd{ 3 };
static constexpr int ProducerChannelFd{ 4 };
int main(int argc, char* argv[])
{
const char* envVersion = std::getenv("MEDIASOUP_VERSION");
if (!envVersion)
{
MS_ERROR_STD("you don't seem to be my real father!");
std::_Exit(41);
}
const std::string version{ envVersion };
const auto statusCode = mediasoup_worker_run(
argc,
argv,
version.c_str(),
ConsumerChannelFd,
ProducerChannelFd,
nullptr,
nullptr,
nullptr,
nullptr);
std::_Exit(statusCode);
}