locked
Playing multiple segments from the same video source using sequencer source RRS feed

  • Question

  • I used the sequencer source playlist example to play multiple segments from the same video file in sequence. Both audio and video from the first segment is played well. However, for all subsequent segments, only audio is played, and no video is shown. When I tried to debug the application using mftrace.exe using the following command:

                   mftrace.exe <my_app_path>

    all segments are played with both audio and video!!!

    I tried to run the application directly from the same console from which I ran mftrace (an elevated windows SDK7.1 command prompt) to check if this is not related to mftrace, but it didn't work.

    My question is: why the application behavior is different when run through mftrace.exe? what changes are made by mftrace that made video from all segments to be played? and what can I do if mftrace can't help me (since the application is working well when run through mftrace)?

     

     

    Tuesday, May 17, 2011 12:48 PM

All replies

  • Different behavior when tracing is turned on usually indicates a race condition.  Unfortunately, these are very difficult to diagnose.

    I think the issue here might be using the 'same video file' between sequencer segments.  If you are pointing seperate media sources to the same video file, this should be okay.  However, if you are reusing the same media source in multiple segments - particularly multiple consecutive segments - I can see this causing seemingly random failures.  The sequencer source makes some assumptions that when it makes state changes to one segment, it will not affect the state of another segment, and reusing a source between segments would disrupt this assumption.

    Ultimately, what I wonder is if all you want to do is play back different segments of the same video file, why not just use the regular old source directly and seek to the desired segment?

    Friday, July 8, 2011 6:10 PM