Exemplo n.º 1
0
        private void MediaPlayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
        {
            var state = (WMPLib.WMPPlayState)e.newState;

            if (state == WMPLib.WMPPlayState.wmppsPlaying)             // = 3
            {
                if (CurMode == VidkaPreviewPlayerMode.StillFrame)
                {
                    Ctlcontrols2.pause();
                    Ctlcontrols2.currentPosition = stillPositionSec;
                    Ctlcontrols2.step(1);
                    CurMode = VidkaPreviewPlayerMode.None;
                }
                else if (CurMode == VidkaPreviewPlayerMode.SequentialPlayback)
                {
                    if (Ctlcontrols2.currentPosition >= curClipSecEnd)
                    {
                        Ctlcontrols2.pause();
                        CurMode = VidkaPreviewPlayerMode.None;
                    }
                }
            }

            //VideoShitbox.ConsoleSingleton.cxzxc("newState:" + e.newState);

            //if ((WMPLib.WMPPlayState)e.newState == WMPLib.WMPPlayState.wmppsStopped)
            //{
            //	MessageBox.Show("WMPLib.WMPPlayState.wmppsStopped");
            //}
        }
Exemplo n.º 2
0
 public void PlayVideoClip(string filename, double clipSecStart, double clipSecEnd)
 {
     Ctlcontrols2.pause();
     CurMode = VidkaPreviewPlayerMode.SequentialPlayback;
     curClipSecEnd = clipSecEnd;
     MediaPlayer.URL = null;
     MediaPlayer.URL = curUrl = filename;
     Ctlcontrols2.currentPosition = clipSecStart;
     Ctlcontrols2.play();
 }
Exemplo n.º 3
0
 public void PlayVideoClip(string filename, double clipSecStart, double clipSecEnd)
 {
     Ctlcontrols2.pause();
     CurMode         = VidkaPreviewPlayerMode.SequentialPlayback;
     curClipSecEnd   = clipSecEnd;
     MediaPlayer.URL = null;
     MediaPlayer.URL = curUrl = filename;
     Ctlcontrols2.currentPosition = clipSecStart;
     Ctlcontrols2.play();
 }
Exemplo n.º 4
0
        public VidkaPreviewPlayer()
        {
            InitializeComponent();

            MediaPlayer.PlayStateChange += MediaPlayer_PlayStateChange;
            MediaPlayer.MediaError += MediaPlayer_MediaError;
            MediaPlayer.uiMode = "none";
            //MediaPlayer.settings.autoStart = false;
            Ctlcontrols2 = (IWMPControls2)MediaPlayer.Ctlcontrols;

            CurMode = VidkaPreviewPlayerMode.None;
        }
Exemplo n.º 5
0
        public VidkaPreviewPlayer()
        {
            InitializeComponent();

            MediaPlayer.PlayStateChange += MediaPlayer_PlayStateChange;
            MediaPlayer.MediaError      += MediaPlayer_MediaError;
            MediaPlayer.uiMode           = "none";
            //MediaPlayer.settings.autoStart = false;
            Ctlcontrols2 = (IWMPControls2)MediaPlayer.Ctlcontrols;

            CurMode = VidkaPreviewPlayerMode.None;
        }
Exemplo n.º 6
0
 public void PlayVideoClip(string filename, double clipSecStart, double clipSecEnd, bool mute)
 {
     previousOneWasInFullScreen = MediaPlayer.fullScreen;
     Ctlcontrols2.pause();
     CurMode = VidkaPreviewPlayerMode.SequentialPlayback;
     curClipSecEnd = clipSecEnd;
     MediaPlayer.URL = null;
     MediaPlayer.URL = curUrl = filename;
     MediaPlayer.settings.mute = mute;
     Ctlcontrols2.currentPosition = clipSecStart;
     Ctlcontrols2.play();
 }
Exemplo n.º 7
0
 public void PlayVideoClip(string filename, double clipSecStart, double clipSecEnd, bool mute)
 {
     previousOneWasInFullScreen = MediaPlayer.fullScreen;
     Ctlcontrols2.pause();
     CurMode                      = VidkaPreviewPlayerMode.SequentialPlayback;
     curClipSecEnd                = clipSecEnd;
     MediaPlayer.URL              = null;
     MediaPlayer.URL              = curUrl = filename;
     MediaPlayer.settings.mute    = mute;
     Ctlcontrols2.currentPosition = clipSecStart;
     Ctlcontrols2.play();
 }
Exemplo n.º 8
0
        public void SetStillFrame(string filename, double offsetSeconds)
        {
            // prepare the message
            CurMode = VidkaPreviewPlayerMode.StillFrame;
            stillPositionSec = offsetSeconds;

            if (curUrl == filename) {
                Ctlcontrols2.currentPosition = stillPositionSec;
                Ctlcontrols2.step(1); //jump to the next frame. This force the player to update frame.
                //MediaPlayer.Refresh();
            }
            else {
                MediaPlayer.URL = curUrl = filename;
                MediaPlayer.Ctlcontrols.currentPosition = stillPositionSec - SHORTEST_TIME_TO_STOP;
                //VideoShitbox.ConsoleSingleton.cxzxc("newURL:" + curUrl);
            }
        }
Exemplo n.º 9
0
        public void SetStillFrame(string filename, double offsetSeconds)
        {
            // prepare the message
            CurMode          = VidkaPreviewPlayerMode.StillFrame;
            stillPositionSec = offsetSeconds;

            if (curUrl == filename)
            {
                Ctlcontrols2.currentPosition = stillPositionSec;
                Ctlcontrols2.step(1);                 //jump to the next frame. This force the player to update frame.
                //MediaPlayer.Refresh();
            }
            else
            {
                MediaPlayer.URL = curUrl = filename;
                MediaPlayer.Ctlcontrols.currentPosition = stillPositionSec - SHORTEST_TIME_TO_STOP;
                //VideoShitbox.ConsoleSingleton.cxzxc("newURL:" + curUrl);
            }
        }
Exemplo n.º 10
0
        private void MediaPlayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
        {
            var state = (WMPLib.WMPPlayState)e.newState;
            if (state == WMPLib.WMPPlayState.wmppsPlaying) // = 3
            {
                if (CurMode == VidkaPreviewPlayerMode.StillFrame)
                {
                    Ctlcontrols2.pause();
                    Ctlcontrols2.currentPosition = stillPositionSec;
                    Ctlcontrols2.step(1);
                    CurMode = VidkaPreviewPlayerMode.None;
                }
                else if (CurMode == VidkaPreviewPlayerMode.SequentialPlayback)
                {
                    if (Ctlcontrols2.currentPosition >= curClipSecEnd)
                    {
                        Ctlcontrols2.pause();
                        CurMode = VidkaPreviewPlayerMode.None;
                    }
                }
            }

            //VideoShitbox.ConsoleSingleton.cxzxc("newState:" + e.newState);

            //if ((WMPLib.WMPPlayState)e.newState == WMPLib.WMPPlayState.wmppsStopped)
            //{
            //	MessageBox.Show("WMPLib.WMPPlayState.wmppsStopped");
            //}
        }
Exemplo n.º 11
0
 public void StopWhateverYouArePlaying()
 {
     Ctlcontrols2.pause();
     CurMode = VidkaPreviewPlayerMode.StillFrame;
     previousOneWasInFullScreen = false;
 }
Exemplo n.º 12
0
 public void StopWhateverYouArePlaying()
 {
     Ctlcontrols2.pause();
     CurMode = VidkaPreviewPlayerMode.StillFrame;
     previousOneWasInFullScreen = false;
 }