Files
AAA 1332473513 feat: rename product and runtime to Piik
Rename the active product, Go module, binaries, configuration, protocols and documentation to Piik while retaining the TV mascot and existing media/room behavior.

Use one current private contract without old-name aliases. Preserve SQLite authority and copy compatible local settings once; other settings start fresh. Git-message cleanup and the infrastructure name cutover are coordinated with this phase, with original history and deployment data archived externally.

Validated locally with Web and Go checks, Windows capture compilation, matched Client/Server builds, packaged Client control handshake and history-rewrite integrity checks. Skip duplicate hosted CI for this owner-authorized local release.

[skip ci]
2026-09-10 11:10:12 +08:00

39 lines
891 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
#include <vector>
#include <vpx/vpx_encoder.h>
namespace piik::capture {
struct Vp8Frame final {
bool key_frame = false;
std::vector<uint8_t> bytes;
};
class Vp8Encoder final {
public:
Vp8Encoder(uint32_t width, uint32_t height, uint32_t frame_rate,
uint32_t bit_rate);
~Vp8Encoder();
Vp8Encoder(const Vp8Encoder&) = delete;
Vp8Encoder& operator=(const Vp8Encoder&) = delete;
// An empty result is a codec-owned frame drop, not an encoder failure.
Vp8Frame Encode(uint8_t* nv12, size_t row_pitch, uint64_t timestamp100ns,
bool key_frame);
void SetBitrate(uint32_t bit_rate);
static const char* Version();
private:
vpx_codec_ctx_t codec_{};
vpx_codec_enc_cfg_t config_{};
uint32_t width_;
uint32_t height_;
unsigned long duration100ns_;
};
} // namespace piik::capture