Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

long Impala::Core::VideoSet::Mpeg7Doc::GetMediaTimePoint ( DOMNode mediaTime  )  [inline, private]

Definition at line 754 of file Mpeg7Doc.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 AddShot(), and GetTemporalDecomposition().

00755     {
00756         DOMNode* timePoint = GetChildNode(mediaTime, "MediaTimePoint", true);
00757         String s = GetElementValue(timePoint);
00758         // e.g. s = T00:28:21:5985F30000
00759         Util::StringParser p(s);
00760         p.Eat('T'); // T is begin of time point
00761         long hours = p.GetInt(':');
00762         long minutes = p.GetInt(':');
00763         long seconds = p.GetInt(':');
00764         p.AdvanceP(1); // skip ':', since it is not whitespace for next
00765         long fractions = p.GetInt('F');
00766         p.AdvanceP(1);
00767         long nrFractions = p.GetInt();
00768         long frame;
00769         frame = (hours*3600 + minutes*60 + seconds)*nrFractions + fractions;
00770         if (nrFractions == 30000) // probably NTSC with time unit PT1001N30000F
00771             frame = frame / 1001;
00772         return frame;
00773     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:30:50 2010 for ImpalaSrc by  doxygen 1.5.1