change port map

This commit is contained in:
pigeatgarlic 2024-03-15 17:33:01 +07:00
parent b2a93fe731
commit 1e33380000
3 changed files with 9 additions and 4 deletions

View File

@ -1112,6 +1112,7 @@ namespace config {
for (auto x = 1; x < argc; ++x) {
auto line = argv[x];
int i = 0;
if (*line == '-') {
if (*(line + 1) == '-') {
char* command = line + 2;
@ -1120,6 +1121,10 @@ namespace config {
sunshine.username = std::string((char*)argv[x + 1]);
else if(strcmp(command, "password") == 0)
sunshine.password = std::string((char*)argv[x + 1]);
else if(strcmp(command, "port") == 0) {
sscanf((char*)argv[x + 1],"%d",&i);
sunshine.port = i;
}
}
}

View File

@ -10,7 +10,7 @@
#include "thread_safe.h"
namespace rtsp_stream {
constexpr auto RTSP_SETUP_PORT = 21;
constexpr auto RTSP_SETUP_PORT = 0;
struct launch_session_t {
crypto::aes_t gcm_key;

View File

@ -11,9 +11,9 @@
#include "video.h"
namespace stream {
constexpr auto VIDEO_STREAM_PORT = 9;
constexpr auto CONTROL_PORT = 10;
constexpr auto AUDIO_STREAM_PORT = 11;
constexpr auto CONTROL_PORT = 1;
constexpr auto VIDEO_STREAM_PORT = 2;
constexpr auto AUDIO_STREAM_PORT = 3;
struct session_t;
struct config_t {