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