const char * file_info::info_get(const char * name) const { assert(is_valid_utf8(name)); int idx = info_get_idx(name); if (idx<0) return 0; else return info_enum_value(idx); }
void file_info::to_console() const { console::formatter() << "File info dump:"; if (get_length() > 0) console::formatter() << "Duration: " << pfc::format_time_ex(get_length(), 6); pfc::string_formatter temp; for(t_size metaWalk = 0; metaWalk < meta_get_count(); ++metaWalk) { meta_format_entry(metaWalk, temp); console::formatter() << "Meta: " << meta_enum_name(metaWalk) << " = " << temp; } for(t_size infoWalk = 0; infoWalk < info_get_count(); ++infoWalk) { console::formatter() << "Info: " << info_enum_name(infoWalk) << " = " << info_enum_value(infoWalk); } }
const char * file_info::info_get_ex(const char * p_name,t_size p_name_length) const { t_size index = info_find_ex(p_name,p_name_length); if (index == pfc_infinite) return 0; return info_enum_value(index); }