Exemplo n.º 1
0
 private async void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Left)
     {
         IWMPControls2 Ctlcontrols2 = (IWMPControls2)axWindowsMediaPlayer1.Ctlcontrols;
         double        frameRate    = axWindowsMediaPlayer1.network.encodedFrameRate;
         Console.WriteLine("FRAMERATE: " + frameRate);              //Debug
         double step = 1.0 / frameRate;
         Console.WriteLine("STEP: " + step);                        //Debug
         axWindowsMediaPlayer1.Ctlcontrols.currentPosition -= step; //Go backwards
         axWindowsMediaPlayer1.Ctlcontrols.pause();
         Ctlcontrols2.step(1);
     }
     if (e.KeyCode == Keys.Right)
     {
         IWMPControls2 Ctlcontrols2 = (IWMPControls2)axWindowsMediaPlayer1.Ctlcontrols;
         double        frameRate    = axWindowsMediaPlayer1.network.encodedFrameRate;
         Console.WriteLine("FRAMERATE: " + frameRate);              //Debug
         double step = 1.0 / frameRate;
         Console.WriteLine("STEP: " + step);                        //Debug
         axWindowsMediaPlayer1.Ctlcontrols.currentPosition += step; //Go backwards
         axWindowsMediaPlayer1.Ctlcontrols.pause();
         Ctlcontrols2.step(1);
     }
 }
Exemplo n.º 2
0
        //Forward frame button
        private void next_button_Click(object sender, EventArgs e)
        {
            //Control casting
            IWMPControls2 Ctlcontrols2 = (IWMPControls2)videoDisplay.Ctlcontrols;

            Ctlcontrols2.step(1);
        }
Exemplo n.º 3
0
 private void btnStepPrev_Click(object sender, EventArgs e)
 {
     if (this.mp.playState == WMPPlayState.wmppsPaused)
     {
         IWMPControls2 ctl2 = (IWMPControls2)mp.Ctlcontrols;
         ctl2.step(-1);
     }
 }
Exemplo n.º 4
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.º 5
0
        private void button3_Click(object sender, EventArgs e)
        {
            IWMPControls2 Ctlcontrols2 = (IWMPControls2)axWindowsMediaPlayer1.Ctlcontrols;
            double        frameRate    = axWindowsMediaPlayer1.network.encodedFrameRate;

            Console.WriteLine("FRAMERATE: " + frameRate); //Debug
            double step = 1.0 / frameRate;

            Console.WriteLine("STEP: " + step);                        //Debug
            axWindowsMediaPlayer1.Ctlcontrols.currentPosition += step; //Go backwards
            axWindowsMediaPlayer1.Ctlcontrols.pause();
            Ctlcontrols2.step(1);
        }
Exemplo n.º 6
0
        private void btnStepRight_Click(object sender, EventArgs e)
        {
            IWMPControls2 Ctlcontrols2 = (IWMPControls2)wmp1.Ctlcontrols;

            Ctlcontrols2.step(1);
        }