MayaFlux 0.4.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 247 of file SoundFileReader.cpp.

250{
251 auto chapters = demux->extract_chapter_regions();
252 auto cues = audio->extract_cue_regions(*demux);
253
254 std::vector<FileRegion> all;
255 all.reserve(chapters.size() + cues.size());
256 all.insert(all.end(), chapters.begin(), chapters.end());
257 all.insert(all.end(), cues.begin(), cues.end());
258
259 std::lock_guard<std::mutex> ml(m_metadata_mutex);
260 m_cached_regions = std::move(all);
261}
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: