Definition at line 957 of file Mpeg7Doc.h. References Impala::Util::StringParser::AdvanceP(), Impala::Util::StringParser::Contains(), Impala::Util::StringParser::Eat(), Fraction2Frame(), Impala::Util::XmlDoc::GetChildNode(), Impala::Util::XmlDoc::GetElementValue(), and Impala::Util::StringParser::GetInt(). Referenced by AddShot(), and ReadData(). 00958 { 00959 DOMNode* duration = GetChildNode(mediaTime, "MediaDuration", true); 00960 String s = GetElementValue(duration); 00961 // e.g. s = PT00H00M04S2122N30000F 00962 Util::StringParser p(s); 00963 p.Eat('T'); // T is begin of duration 00964 long total = 0; 00965 if (p.Contains("H")) 00966 { 00967 total += p.GetInt('H') * 3600; 00968 p.AdvanceP(1); 00969 } 00970 if (p.Contains("M")) 00971 { 00972 total += p.GetInt('M') * 60; 00973 p.AdvanceP(1); 00974 } 00975 if (p.Contains("S")) 00976 { 00977 total += p.GetInt('S'); 00978 p.AdvanceP(1); 00979 } 00980 long fractions = p.GetInt('N'); 00981 p.AdvanceP(1); 00982 long nrFractions = p.GetInt('F'); 00983 long dur = total*nrFractions + fractions; 00984 return Fraction2Frame(dur); 00985 }
Here is the call graph for this function:
|