Medialooks Knowledge Base Support Center

Contact Us

Simple playlist emulation with MFormats SDK

You should use 2 MFReader objects to emulate a playlist behavior.

  1. Create the 1st MFReader object and initialize it with the 1st file of your playlist with the ReaderOpen method.
  2. Create the 2nd MFReader object and open the 2nd file with the ReaderOpen method.
  3. Start playback of the 1st MFReader.
  4. Check frame flags received from the source object. When you get a frame with the "Last" flag you should switch to the next MFReader object to grab frames from it. You can check the last frame with this code:
M_TIME mTime;
pFrame.MFTimeGet(out mTime);
if ((mTime.eFFlags & eMFrameFlags.eMFF_Last) != 0) 
{
// indicate to switch to the next reader
}
  1. Continue playback of the 2nd MFReader and initialize the next file with the ReaderOpen method for the 1st MFReader object.

Repeat steps 3-5 to emulate a simple playlist behavior.