Media Foundation : Looping & Sequences

Steve Williams 1 Reputation point
2021-03-30T10:29:21.947+00:00

Got an instability performing a simple loop of one short video (provided as repro)

https://stackoverflow.com/questions/66867668/media-foundation-looping-video-unstable-on-6th-run

Also found : https://learn.microsoft.com/.../sequencer-source-example-code

Playlist .... mmkay. https://learn.microsoft.com/.../medfound/playlist-sample "this sample is no longer included"

Can I have access to the playlist sample, please. I'd rather not type it in again from what's possibly incomplete documentation.

Also any idea why simple looping is unstable ?

Thanks in advance.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Castorix31 81,721 Reputation points
    2021-03-31T06:38:05.527+00:00

    Can I have access to the playlist sample, please.

    The class is in the doc CPlaylist Class

    0 comments No comments

  2. Steve Williams 1 Reputation point
    2021-03-31T08:29:43.79+00:00

    GetDurationFromTopology defined after use in copy & paste code.

    Should be a prototype up top.

    0 comments No comments

  3. Steve Williams 1 Reputation point
    2021-03-31T09:55:57.753+00:00

    CPlaylist::Initialize() fails. Complains shutdown called, which is incorrect error, startup hasn't been.;

    HRESULT CPlaylist::Initialize()
    {
    // PATCH: Added.
    CPlayer::Initialize();

    why is this not on github please. is there more wrong with it ?

    0 comments No comments

  4. Steve Williams 1 Reputation point
    2021-03-31T10:52:42.593+00:00

    Got CPlaylist in & running with minor tweaks above. Looping as per CPlayer example screws up the same way.

    Next to try looping via sequence or morph of that code. I need seamless looping for video textures so tearing down & rebuild of entire topology after each loop of something that might be a second or so long isn't ideal.

    I think playback breakup after 6 simple loops is a bug. If you can do 5, you can do 6 if the code is solid.

    MS: can you repro the problem, please.

    0 comments No comments