39 [[
nodiscard]] std::expected<AviMetadata, std::string>
46 std::span<const std::uint8_t>
aviBytes,
55 std::int32_t desiredFrame);
57 [[
nodiscard]] std::expected<std::int32_t, std::string>
64 std::int32_t decisionFrame,
65 std::int32_t jumpToFrame);
68 std::int32_t decisionFrame,
69 bool takeJump)
noexcept;
93 std::int32_t jumpToFrame{-1};
97 AviMetadata metadata_{};
100 std::map<std::int32_t, Alternative> alternatives_;
101 std::optional<JumpEvent> pendingJump_;
std::vector< std::byte > bytes
const AviMetadata & metadata() const noexcept
std::expected< void, std::string > cutToFrame(std::int32_t frame)
std::expected< std::int32_t, std::string > frameAtElapsed(std::uint64_t elapsedMicroseconds) const
std::expected< Status, std::string > feedToFrame(std::int32_t desiredFrame)
std::optional< JumpEvent > takeJumpEvent() noexcept
bool open() const noexcept
const Status & status() const noexcept
std::expected< void, std::string > setAlternative(std::int32_t decisionFrame, std::int32_t jumpToFrame)
void forgetAlternatives() noexcept
bool changeAlternative(std::int32_t decisionFrame, bool takeJump) noexcept
std::expected< AviMetadata, std::string > parseAviMetadata(std::span< const std::uint8_t > bytes)
std::int32_t decisionFrame
friend bool operator==(const JumpEvent &, const JumpEvent &)=default
friend bool operator==(const Status &, const Status &)=default
std::int32_t desiredFrame
std::int32_t currentFrame
std::int32_t numberOfFrames