style: add clang-format config and reformat scaffolding files

This commit is contained in:
2026-09-07 10:07:26 +02:00
parent 975e3b2974
commit 50369995c7
12 changed files with 100 additions and 64 deletions
+5 -5
View File
@@ -7,19 +7,19 @@
namespace sc {
struct SendCommand {
std::string_view target = "monitor"; // monitor, window, region
std::string_view peer_address; // optional
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
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[] );
std::optional<Command> parse_cli(int argc, const char* argv[]);
} // namespace sc
} // namespace sc
+9 -11
View File
@@ -3,8 +3,6 @@
#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"
@@ -30,11 +28,11 @@ struct ReceiverPipelineConfig {
// Sender pipeline: capture → encode → packetize → RTP/UDP.
class SenderPipeline {
public:
explicit SenderPipeline ( SenderPipelineConfig config );
~SenderPipeline ();
explicit SenderPipeline(SenderPipelineConfig config);
~SenderPipeline();
bool start ();
void stop ();
bool start();
void stop();
private:
class Impl;
@@ -44,15 +42,15 @@ class SenderPipeline {
// Receiver pipeline: RTP/UDP → depacketize → decode → render.
class ReceiverPipeline {
public:
explicit ReceiverPipeline ( ReceiverPipelineConfig config );
~ReceiverPipeline ();
explicit ReceiverPipeline(ReceiverPipelineConfig config);
~ReceiverPipeline();
bool start ();
void stop ();
bool start();
void stop();
private:
class Impl;
std::unique_ptr<Impl> impl_;
};
} // namespace sc
} // namespace sc