1

I have a video player which loads videos (.wav) to a playlist and scrolls through the playlist using a play queue manipulated by the playstatechange events. It works fine except for a black flicker (usually just one) that happens on the last frame of a random video (never the same spot in the play list or the same video). This also occurs on multiple computers so I am pretty sure it is not any video card settings, unless an obscure codec issue. This is for a research experiment and cannot have the flicker, it must be completely seamless. I have searched through every question and the only similar one did not involve a playlist of multiple videos, his flicker was when looping the same video, thus a totally different solution. Here is my video player creation and implementation:

  public void MultipleVideos()
    {
        player.CreateControl();
        player.Enabled = true;
        player.enableContextMenu = false;
        player.uiMode = "none";
        player.Name = "player";
        player.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
        WMPLib.IWMPMedia media;
        WMPLib.IWMPPlaylist playlist = player.playlistCollection.newPlaylist("myplaylist");

        for (int x = 0; x < _presented.count; x++)
        {

            media = player.newMedia(_presented.getItem(x).video);
            playlist.appendItem(media);
        }
        player.currentPlaylist = playlist;
    }


  private void player_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
    {
        if (!currSess.playOne)
        {
            if (e.newState == 8 | e.newState == 9)
            {
                if (e.newState == 8)
                {
                    currSess.playQueue++;
                }
            }

                if (currSess.playQueue+1 > player.currentPlaylist.count -1)
                {
                    if (e.newState == 10)
                    {
                        player.uiMode = "invisible";
                        player.Visible = false;
                        displayImgs();
                        currSess._timer.start();
                        AllowControls(true);
                        allowItems();
                        player.PlayStateChange -= foo;
                        currSess.playQueue = 0;
                    }
                }
        }
    }
Harrison
  • 57
  • 11
  • My only theory of why the flicker occurs is a result of the PlayStateChange event having a small delay to register, but that does not explain why the flicker only occurs once on a random video at a random point in the playlist. – Harrison Nov 10 '16 at 16:22

0 Answers0