MayaFlux 0.3.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 209 of file SoundFileReader.cpp.

210{
211 std::shared_lock<std::shared_mutex> lock(m_context_mutex);
212 if (!m_demux || !m_audio)
213 return {};
214
215 {
216 std::lock_guard<std::mutex> ml(m_metadata_mutex);
217 if (!m_cached_regions.empty())
218 return m_cached_regions;
219 }
220
222
223 std::lock_guard<std::mutex> ml(m_metadata_mutex);
224 return m_cached_regions;
225}
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: