26 lines
598 B
C++
26 lines
598 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <string_view>
|
|
#include <variant>
|
|
|
|
namespace sc {
|
|
|
|
struct SendCommand {
|
|
std::string_view target = "monitor"; // monitor, window, region
|
|
std::string_view peer_address; // optional
|
|
int bitrate_kbps = 4000;
|
|
};
|
|
|
|
struct ReceiveCommand {
|
|
std::string_view peer_address; // optional
|
|
int local_rtp_port = 5004;
|
|
};
|
|
|
|
using Command = std::variant<SendCommand, ReceiveCommand>;
|
|
|
|
// Parse command line arguments. Prints usage and returns std::nullopt on error.
|
|
std::optional<Command> parse_cli(int argc, const char* argv[]);
|
|
|
|
} // namespace sc
|