IBasicVideoEffect and MediaPlaybackList

mcosmin 1 Reputation point
2020-01-27T09:12:44.143+00:00

I have a MediaPlaybackList and a IBasicVideoEffect.

I add the effect onto a MediaPlayer object before setting the MediaPlaybackList as source (due to obvious reasons).

Now the catch is, the MediaPlaybackList sometimes skips PlaybackItems at random, sometimes as many as 4 in a row. It simply reports "Error" as the reason for changing the item. Often times I can view as many as 8-9 videos gaplessly, and then the MediaPlaybackList simply decides to skip a bunch, and then go on and play a few videos like nothing happened.

This seems to be related to the IBasicVideoEffect, but I don't understand how.

Are there any special considerations when doing this combination? Is the IBasicVideoEffect not designed to work with MediaPlaybackList? Is there a way to track down the "Error" reported by MediaPlaybackList as reason for changing the item?

Additional error info seems to be

A valid type has not been set for this stream or a stream that it depends on. (Exception from HRESULT: 0xC00D6D60)

More info: I am adding media playback items into the list dynamically. This seems to have an impact, as adding a new list will call Close/SetEncodingProperties again.

https://social.msdn.microsoft.com/Forums/en-US/6a8b41ee-71ad-4e83-8e76-f25ba8de327a/uwp-any-special-considerations-when-using-ibasicvideoeffect-with-mediaplaybacklist?forum=wpdevelop

repo sample

https://aka.ms/AA53ab2

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Dailey - MSFT 336 Reputation points Microsoft Employee
    2020-01-27T19:01:24.607+00:00

    The problem is likely due to a media type mismatch between the video effect and the next file in the list. I'm going to wager that when files get skipped they have a different format, resolution, etc. than the first file in the list that played correctly. This is probably because the video effect rigidly sets it's media type and then isn't responding to the dynamic format change, rejecting the media type of the new file in the list.

    I would recommend debugging the video effect and making sure that the plug-in is responding to media type changes properly.

    If you think I'm missing something let me know.