Scaffold C++20 screencast project with Meson, agent workflow, and phase plan
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "screencast/codec/encoder.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
namespace sc {
|
||||
|
||||
struct DecodedFrame {
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
uint64_t capture_timestamp_ns = 0;
|
||||
std::vector<std::byte> rgba_pixels;
|
||||
};
|
||||
|
||||
struct DecoderConfig {
|
||||
std::string_view codec_name = "h264";
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
};
|
||||
|
||||
class Decoder {
|
||||
public:
|
||||
virtual ~Decoder () = default;
|
||||
|
||||
// Feed one encoded frame. Returns decoded frames when available.
|
||||
virtual std::vector<DecodedFrame> decode ( const EncodedFrame &frame ) = 0;
|
||||
};
|
||||
|
||||
class DecoderFactory {
|
||||
public:
|
||||
static std::unique_ptr<Decoder> create ( const DecoderConfig &config );
|
||||
};
|
||||
|
||||
} // namespace sc
|
||||
Reference in New Issue
Block a user