mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-18 11:10:04 +00:00
39 lines
677 B
C++
39 lines
677 B
C++
//
|
|
// Created by loki on 5/30/19.
|
|
//
|
|
|
|
#include <thread>
|
|
#include <filesystem>
|
|
#include <iostream>
|
|
|
|
#include "nvhttp.h"
|
|
#include "stream.h"
|
|
|
|
extern "C" {
|
|
#include <rs.h>
|
|
}
|
|
|
|
#include "config.h"
|
|
#include "platform/common.h"
|
|
using namespace std::literals;
|
|
int main(int argc, char *argv[]) {
|
|
if(argc > 1) {
|
|
if(!std::filesystem::exists(argv[1])) {
|
|
std::cout << "Error: Couln't find configuration file ["sv << argv[1] << ']' << std::endl;
|
|
return 7;
|
|
}
|
|
|
|
config::parse_file(argv[1]);
|
|
}
|
|
|
|
reed_solomon_init();
|
|
|
|
std::thread httpThread { nvhttp::start };
|
|
std::thread rtpThread { stream::rtpThread };
|
|
|
|
httpThread.join();
|
|
rtpThread.join();
|
|
|
|
return 0;
|
|
}
|