Media foundation playlist RRS feed

  • Question

  • I am having trouble finding a sample program to play a playlist under Media Foundation. I see a comment that an example was removed 'in favor' of another interface, now deprecated. No one seems to have bothered to put a non-deprecated example out there, I have to download and cut a CD to find an example. The topic seems old, dead links and so on.

    So, can someone point me to a code sample?



    Friday, May 9, 2014 2:07 AM

All replies

  • Hello.

    Check this message : Sequencer Source

    You will find links to sample code.

    Friday, May 9, 2014 9:03 PM
  • Thanks for pointer!@ One minor problem, it does not compile clean. Still, there are plenty of tips in there that I am sure I can put to good use. Has anyone else run into compiler issues? Here are my messages:

    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(70): error C2039: 'nothrow' : is not a member of 'std'
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(70): error C2065: 'nothrow' : undeclared identifier
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(137): error C2661: 'CPlayer::CPlayer' : no overloaded function takes 3 arguments
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(158): error C2660: 'CPlayer::CreateMediaSource' : function does not take 2 arguments
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(170): error C3861: 'CreatePlaybackTopology': identifier not found
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(367): error C3861: 'GetEventObject': identifier not found
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(387): error C3861: 'GetDurationFromTopology': identifier not found
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(441): error C3861: 'GetEventObject': identifier not found
    1>l:\tools\visual\pc_hvs3\pc_hvs2\playlist.cpp(491): error C3861: 'GetCollectionObject': identifier not found

    I can't help but wonder if I'm missing an H file or some such.


    Saturday, May 10, 2014 12:20 AM
  • Hello.

    Yes it's very confused.

    -> error C2039: 'nothrow'. You must include this file : #include <new>

    -> error C2661: 'CPlayer::CPlayer'. Here, CPlayer takes two arguments Playback Sample

    -> error C3861: 'CreatePlaybackTopology'. Check here Playback Topologies

    -> error C3861: 'GetCollectionObject'. Check here Playback

    Yes, all samples are dispatched.

    Saturday, May 10, 2014 7:27 PM