57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "screencast/capture/capture.h"
|
|
#include "screencast/codec/decoder.h"
|
|
#include "screencast/codec/encoder.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
|