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

◆ sample_time()

std::optional< double > MayaFlux::IO::SpatialReader::sample_time ( const std::string &  stream_name,
size_t  index 
) const

Time in seconds the archive assigns to a sample.

Returns
The time, or nullopt if the stream or index is invalid.

Definition at line 479 of file SpatialReader.cpp.

481{
482 const auto it = m_impl->records.find(stream_name);
483 if (it == m_impl->records.end()
484 || index >= it->second.sample_count
485 || !it->second.time_sampling) {
486 return std::nullopt;
487 }
488
489 return static_cast<double>(
490 it->second.time_sampling->getSampleTime(static_cast<index_t>(index)));
491}
uint32_t index
Definition VKDevice.cpp:122
std::unique_ptr< Impl > m_impl

References index, and m_impl.