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

◆ get_regions()

std::vector< FileRegion > MayaFlux::IO::SoundFileReader::get_regions ( ) const
overridevirtual

Get all regions (markers, loops, etc.) from the file.

Returns
Vector of FileRegion structures.

Implements MayaFlux::IO::FileReader.

Definition at line 211 of file SoundFileReader.cpp.

212{
213 std::shared_lock<std::shared_mutex> lock(m_context_mutex);
214 if (!m_demux || !m_audio)
215 return {};
216
217 {
218 std::lock_guard<std::mutex> ml(m_metadata_mutex);
219 if (!m_cached_regions.empty())
220 return m_cached_regions;
221 }
222
224
225 std::lock_guard<std::mutex> ml(m_metadata_mutex);
226 return m_cached_regions;
227}
void build_regions(const std::shared_ptr< FFmpegDemuxContext > &demux, const std::shared_ptr< AudioStreamContext > &audio) const
Build and cache FileRegion list from both contexts.
std::shared_ptr< AudioStreamContext > m_audio
Codec + resampler state.
std::shared_mutex m_context_mutex
Guards both context pointers.
std::mutex m_metadata_mutex
Mutex for thread-safe metadata access.
std::vector< FileRegion > m_cached_regions
Cached file regions (markers, loops, etc.).
std::shared_ptr< FFmpegDemuxContext > m_demux
Container / format state.

References build_regions(), m_audio, m_cached_regions, m_context_mutex, m_demux, and m_metadata_mutex.

Referenced by load_into_container().

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