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

◆ regions_to_groups()

std::unordered_map< std::string, Kakshya::RegionGroup > MayaFlux::IO::FileReader::regions_to_groups ( const std::vector< FileRegion > &  regions)
staticprotected

Convert file regions to region groups.

Parameters
regionsVector of file regions.
Returns
Region groups organized by type.

Groups regions by their type field, producing a map from type to RegionGroup.

Definition at line 37 of file SoundFileReader.cpp.

38{
39 std::unordered_map<std::string, Kakshya::RegionGroup> groups;
40
41 for (const auto& region : regions) {
42 auto& group = groups[region.type];
43 group.name = region.type;
44 group.add_region(region.to_region());
45 }
46
47 return groups;
48}

Referenced by MayaFlux::IO::SoundFileReader::load_into_container(), and MayaFlux::IO::VideoFileReader::load_into_container().

+ Here is the caller graph for this function: