Definition at line 268 of file Mpeg7DocAudio.h. References Impala::Util::StringParser::AdvanceP(), Impala::Util::StringParser::Eat(), Impala::Util::XmlDoc::GetChildNode(), Impala::Util::XmlDoc::GetElementValue(), and Impala::Util::StringParser::GetInt(). Referenced by AddSegment(). 00269 { 00270 DOMNode* timePoint = GetChildNode(mediaTime, "MediaTimePoint", true); 00271 String s = GetElementValue(timePoint); 00272 // e.g. s = T00:28:21:5985F30000 00273 Util::StringParser p(s); 00274 p.Eat('T'); // T is begin of time point 00275 long hours = p.GetInt(':'); 00276 long minutes = p.GetInt(':'); 00277 long seconds = p.GetInt(':'); 00278 p.AdvanceP(1); // skip ':', since it is not whitespace for next 00279 long fractions = p.GetInt('F'); 00280 p.AdvanceP(1); 00281 long nrFractions = p.GetInt(); 00282 long frame; 00283 frame = (hours*3600 + minutes*60 + seconds)*nrFractions + fractions; 00284 if (nrFractions == 30000) // probably NTSC with time unit PT1001N30000F 00285 frame = frame / 1001; 00286 return frame; 00287 }
Here is the call graph for this function:
|