11#include <promeki/config.h>
12#if PROMEKI_ENABLE_PROAV
18#include <vtc/ltc_audio.h>
20PROMEKI_NAMESPACE_BEGIN
48 using UPtr = UniquePtr<LtcEncoder>;
73 LtcEncoder(
int sampleRate,
const FrameRate &frameRate,
float level = 0.5f);
76 ~LtcEncoder() =
default;
78 LtcEncoder(
const LtcEncoder &) =
delete;
79 LtcEncoder &operator=(
const LtcEncoder &) =
delete;
80 LtcEncoder(LtcEncoder &&) =
default;
81 LtcEncoder &operator=(LtcEncoder &&) =
default;
87 int sampleRate()
const {
return _encoder.sample_rate; }
99 FrameRate frameRate()
const {
return _frameRate; }
105 float level()
const {
return _encoder.level; }
111 void setLevel(
float level);
146 List<int8_t> encode(
const Timecode &tc);
165 size_t frameSizeApprox(
const VtcFormat *format)
const;
168 VtcLTCEncoder _encoder;
169 FrameRate _frameRate;
176 List<int8_t> _codewordBuf;
177 size_t _codewordCursor = 0;
178 int64_t _videoFramesEmitted = 0;
179 int64_t _samplesEmittedTotal = 0;