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

◆ read_exported_tracks()

std::vector< Kinesis::Vision::TrackResult > MayaFlux::Yantra::VisionGpuExecutor::read_exported_tracks ( const Kinesis::Vision::VisionResult &  result)
static

Host tracks decoded from result.buffers.tracks, or empty.

For occasional host access, not per-frame use: reads a device-local buffer through its host mapping. Valid for one more run after the result was delivered.

Definition at line 697 of file VisionFlowDispatch.cpp.

698{
699 const auto& handle = result.buffers.tracks;
700 const auto count = exported_record_count(handle, 2);
701
702 if (!count)
703 return {};
704
705 const auto* header = static_cast<const glm::vec4*>(handle->mapped_ptr);
706 return decode_track_records(header + 1, *count);
707}
size_t count
std::optional< uint32_t > exported_record_count(const std::shared_ptr< Portal::Graphics::GpuBufferHandle > &handle, size_t stride_vec4)
Clamped record count from an exported buffer's vec4 header, or nullopt when the buffer isn't readable...

References MayaFlux::Kinesis::Vision::VisionResult::buffers, count, MayaFlux::Yantra::VisionInternal::exported_record_count(), and MayaFlux::Kinesis::Vision::BufferOutputs::tracks.

+ Here is the call graph for this function: