MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_frames_typed()

void MayaFlux::Kakshya::VideoStreamContainer::get_frames_typed ( std::span< uint8_t >  output,
uint64_t  start_frame,
uint64_t  num_frames 
) const
private

Definition at line 506 of file VideoStreamContainer.cpp.

507{
508 const size_t frame_size = get_frame_byte_size();
509 const size_t required = static_cast<size_t>(num_frames) * frame_size;
510
511 if (output.size() < required) {
512 error<std::runtime_error>(
515 std::source_location::current(),
516 "VideoStreamContainer::get_frames_typed: output buffer too small ({} < {})",
517 output.size(), required);
518 }
519
520 for (uint64_t i = 0; i < num_frames; ++i) {
521 auto frame = get_frame_typed(start_frame + i);
522 std::ranges::copy(frame, output.begin() + static_cast<size_t>(i) * frame_size);
523 }
524}
std::shared_ptr< Core::VKImage > output
size_t get_frame_byte_size() const
Get the total byte size of one frame (width * height * channels).
std::span< const uint8_t > get_frame_typed(uint64_t frame_index) const
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References get_frame_byte_size(), get_frame_typed(), MayaFlux::Journal::Kakshya, output, and MayaFlux::Journal::Runtime.

Referenced by get_frames_impl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: