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

◆ build_regions()

void MayaFlux::IO::SoundFileReader::build_regions ( const std::shared_ptr< FFmpegDemuxContext > &  demux,
const std::shared_ptr< AudioStreamContext > &  audio 
) const
private

Build and cache FileRegion list from both contexts.

Definition at line 245 of file SoundFileReader.cpp.

248{
249 auto chapters = demux->extract_chapter_regions();
250 auto cues = audio->extract_cue_regions(*demux);
251
252 std::vector<FileRegion> all;
253 all.reserve(chapters.size() + cues.size());
254 all.insert(all.end(), chapters.begin(), chapters.end());
255 all.insert(all.end(), cues.begin(), cues.end());
256
257 std::lock_guard<std::mutex> ml(m_metadata_mutex);
258 m_cached_regions = std::move(all);
259}
std::mutex m_metadata_mutex
Mutex for thread-safe metadata access.
std::vector< FileRegion > m_cached_regions
Cached file regions (markers, loops, etc.).

References m_cached_regions, and m_metadata_mutex.

Referenced by get_regions(), open(), and open_from_demux().

+ Here is the caller graph for this function: