Scaffold C++20 screencast project with Meson, agent workflow, and phase plan
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "screencast/codec/decoder.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
|
||||
namespace sc {
|
||||
|
||||
struct RendererConfig {
|
||||
std::string_view window_title = "screencast receiver";
|
||||
int initial_width = 1280;
|
||||
int initial_height = 720;
|
||||
};
|
||||
|
||||
class Renderer {
|
||||
public:
|
||||
virtual ~Renderer () = default;
|
||||
|
||||
// Present one decoded frame. Returns false if the window was closed.
|
||||
virtual bool present ( const DecodedFrame &frame ) = 0;
|
||||
|
||||
// Pump events (window close, resize). Non-blocking.
|
||||
virtual bool poll_events () = 0;
|
||||
|
||||
// Destroy the window and release GPU resources.
|
||||
virtual void shutdown () = 0;
|
||||
};
|
||||
|
||||
class RendererFactory {
|
||||
public:
|
||||
static std::unique_ptr<Renderer> create ( const RendererConfig &config );
|
||||
};
|
||||
|
||||
} // namespace sc
|
||||
Reference in New Issue
Block a user