623{
625 const size_t required = static_cast<size_t>(num_frames) * elements_per_frame;
626
627 if (
output.size() < required) {
628 error<std::runtime_error>(
631 std::source_location::current(),
632 "VideoStreamContainer::get_frames_typed_as: output buffer too small ({} < {})",
634 }
635
637
638 for (uint64_t i = 0; i < num_frames; ++i) {
640 if (bytes.size() < frame_bytes)
641 continue;
642 std::memcpy(
output.data() + i * elements_per_frame, bytes.data(), frame_bytes);
643 }
644}
std::shared_ptr< Core::VKImage > output
size_t get_frame_element_count() const
Elements in one frame: width * height * channels.
std::span< const uint8_t > get_frame_pixels(uint64_t frame_index) const
Get raw pixel data for a single frame as a byte span.
size_t get_frame_byte_size() const
Total byte size of one frame: width * height * bytes_per_pixel.
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.