feat(capture): add Phase 3 PipeWire capture stub and config string safety

Add a linkable CaptureFactory stub so the capture API can be consumed

without unresolved symbols. Change remaining config string_view fields to

std::string to prevent dangling references. Update handoff memory.
This commit is contained in:
2026-09-07 10:08:02 +02:00
parent 71218b1b1f
commit 6f4c670aa8
6 changed files with 58 additions and 24 deletions
+8 -10
View File
@@ -2,36 +2,34 @@
#include "screencast/codec/decoder.h"
#include <cstdint>
#include <memory>
#include <optional>
#include <string_view>
#include <string>
namespace sc {
struct RendererConfig {
std::string_view window_title = "screencast receiver";
std::string window_title = "screencast receiver";
int initial_width = 1280;
int initial_height = 720;
};
class Renderer {
public:
virtual ~Renderer () = default;
virtual ~Renderer() = default;
// Present one decoded frame. Returns false if the window was closed.
virtual bool present ( const DecodedFrame &frame ) = 0;
virtual bool present(const DecodedFrame& frame) = 0;
// Pump events (window close, resize). Non-blocking.
virtual bool poll_events () = 0;
virtual bool poll_events() = 0;
// Destroy the window and release GPU resources.
virtual void shutdown () = 0;
virtual void shutdown() = 0;
};
class RendererFactory {
public:
static std::unique_ptr<Renderer> create ( const RendererConfig &config );
static std::unique_ptr<Renderer> create(const RendererConfig& config);
};
} // namespace sc
} // namespace sc