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

◆ seek()

bool MayaFlux::IO::SoundFileReader::seek ( const std::vector< uint64_t > &  position)
overridevirtual

Seek to a specific position in the file.

Parameters
positionVector of dimension indices.
Returns
True if seek succeeded.

Implements MayaFlux::IO::FileReader.

Definition at line 713 of file SoundFileReader.cpp.

714{
715 if (position.empty()) {
716 set_error("Empty position vector");
717 return false;
718 }
719
720 std::unique_lock<std::shared_mutex> lock(m_context_mutex);
721
722 if (!m_context || !m_context->is_valid()) {
723 set_error("File not open");
724 return false;
725 }
726
727 return seek_internal(m_context, position[0]);
728}
bool seek_internal(std::shared_ptr< FFmpegContext > &ctx, uint64_t frame_position)
Internal seek implementation.
void set_error(const std::string &error) const
Set the last error message.
std::shared_ptr< FFmpegContext > m_context

References m_context, m_context_mutex, seek_internal(), and set_error().

+ Here is the call graph for this function: