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

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

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

+ Here is the caller graph for this function: