You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/*
MediaMtx (C++) - settings of the reusable parts (WebRTC server, recorder)
Shared by the stand-alone server (Projects/MediaMtx, which adds the command line, the paths file, the RTSP sources and the API) and la_mojo (kernelModuleEmbedVideo, which feeds the streams itself). The names follow MediaMTX (webrtcAddress, recordPath, ...).*/#pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace mtx {
struct ServerConf{ // WebRTC (WHEP)
std::string webrtcAddress = ":8889"; std::string webrtcAllowOrigin = "*"; std::vector<std::string> webrtcICEServers; // e.g. stun:stun.l.google.com:19302
std::string webrtcBindAddress; // ICE: bind to this local address (default: all)
uint16_t webrtcUDPPortMin = 8189; uint16_t webrtcUDPPortMax = 8289;
// recording
std::string recordPath = "./recordings/%path/%Y-%m-%d_%H-%M-%S-%f"; int64_t recordSegmentDurationMs = 60000; int64_t recordPartDurationMs = 1000;};
// "60s", "1m", "500ms", "1h", "1.5s"; plain number = seconds
bool parseDurationMs(const std::string & s, int64_t & ms);// "host:port" / ":port" -> host ("" = any) and port
bool splitHostPort(const std::string & addr, std::string & host, uint16_t & port);// rtsp://user:pass@host/... -> rtsp://host/... (for logs)
std::string hideCredentials(const std::string & url);
} // namespace mtx
|