Scaffold C++20 screencast project with Meson, agent workflow, and phase plan

This commit is contained in:
2026-08-28 21:54:32 +02:00
commit 742611b841
25 changed files with 1322 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#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
+58
View File
@@ -0,0 +1,58 @@
#pragma once
#include "screencast/capture/capture.h"
#include "screencast/codec/decoder.h"
#include "screencast/codec/encoder.h"
#include "screencast/network/discovery.h"
#include "screencast/network/signaling.h"
#include "screencast/network/transport.h"
#include "screencast/render/renderer.h"
#include <memory>
#include <optional>
namespace sc {
struct SenderPipelineConfig {
CaptureTarget capture_target;
EncoderConfig encoder;
Endpoint local_rtp_endpoint;
std::optional<Endpoint> signaling_server;
};
struct ReceiverPipelineConfig {
DecoderConfig decoder;
Endpoint local_rtp_endpoint;
std::optional<Endpoint> peer_signaling;
RendererConfig renderer;
};
// Sender pipeline: capture → encode → packetize → RTP/UDP.
class SenderPipeline {
public:
explicit SenderPipeline ( SenderPipelineConfig config );
~SenderPipeline ();
bool start ();
void stop ();
private:
class Impl;
std::unique_ptr<Impl> impl_;
};
// Receiver pipeline: RTP/UDP → depacketize → decode → render.
class ReceiverPipeline {
public:
explicit ReceiverPipeline ( ReceiverPipelineConfig config );
~ReceiverPipeline ();
bool start ();
void stop ();
private:
class Impl;
std::unique_ptr<Impl> impl_;
};
} // namespace sc