Пример #1
0
 bool TimeSeek(double pts, bool preceeding)
 {
   AP4_Ordinal sampleIndex;
   if (AP4_SUCCEEDED(SeekSample(m_Track->GetId(), static_cast<AP4_UI64>(pts*(double)m_Track->GetMediaTimeScale()), sampleIndex, preceeding)))
   {
     if (m_Decrypter)
       m_Decrypter->SetSampleIndex(sampleIndex);
     m_started = true;
     return AP4_SUCCEEDED(ReadSample());
   }
   return false;
 };
Пример #2
0
 bool TimeSeek(double pts, bool preceeding)
 {
   if (AP4_SUCCEEDED(SeekSample(m_Track->GetId(), static_cast<AP4_UI64>(pts*(double)m_Track->GetMediaTimeScale()), preceeding)))
     return AP4_SUCCEEDED(ReadSample());
   return false;
 };