Exemplo n.º 1
0
 private void buttonDestroyPlayer_Click(object sender, EventArgs e)
 {
     timerForPlaying.Stop();
     Log("StopTimer");
     LibPlayer.DestroyPlayer(player);
     Log("DestroyPlayer");
 }
Exemplo n.º 2
0
 private void buttonCreatePlayer_Click(object sender, EventArgs e)
 {
     player = LibPlayer.CreatePlayer();
     Log("CreatePlayer");
     timerForPlaying.Start();
     Log("StartTimer");
 }
Exemplo n.º 3
0
        private void buttonGetDuation_Click(object sender, EventArgs e)
        {
            int      seconds = LibPlayer.Player_GetDuation(player);
            TimeSpan ts      = TimeSpan.FromSeconds(seconds);

            duation.Text = "duation: " + ts.ToString(@"d\d\:h\h\:m\m\:s\s");
            //duation.Text = seconds.ToString();
        }
Exemplo n.º 4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     timerForPlaying.Stop();
     Log("StopTimer");
     LibPlayer.DestroyPlayer(player);
     Log("DestroyPlayer");
     LibPlayer.DestroyRender(render);
     Log("DestroyRender");
 }
Exemplo n.º 5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     render = LibPlayer.CreateRender(Handle);
     Log("CreateRender");
     player = LibPlayer.CreatePlayer();
     Log("CreatePlayer");
     timerForPlaying.Start();
     Log("StartTimer");
 }
Exemplo n.º 6
0
        private void Timer_Render(object sender, EventArgs e)
        {
            LibPlayer.RenderOneFrame(render, player);
            int duation = LibPlayer.Player_GetDuation(player);
            int curpos  = LibPlayer.Player_GetCurrentPosition(player);

            process.Minimum = 0;
            process.Maximum = duation;
            process.Value   = curpos;
            process.Update();
            //label1.Text = (++num).ToString();
            //Thread.Sleep(3000);
        }
Exemplo n.º 7
0
        private void buttonOpen_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog openFileDialog = new OpenFileDialog())
            {
                openFileDialog.InitialDirectory = "e:\\Movies";
                openFileDialog.Filter           = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
                openFileDialog.FilterIndex      = 2;
                openFileDialog.RestoreDirectory = true;

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    //Get the path of specified file
                    string filePath = openFileDialog.FileName;
                    Log(filePath);


                    LibPlayer.Player_Open(player, filePath);
                }
            }
        }
Exemplo n.º 8
0
 private void buttonRenderOneFrame_Click(object sender, EventArgs e)
 {
     LibPlayer.RenderOneFrame(render, player);
 }
Exemplo n.º 9
0
 private void buttonReleaseGL_Click(object sender, EventArgs e)
 {
     LibPlayer.DestroyRender(render);
     Log("DestroyRender");
 }
Exemplo n.º 10
0
 private void buttonInitializeGL_Click(object sender, EventArgs e)
 {
     render = LibPlayer.CreateRender(Handle);
     Log("CreateRender");
 }
Exemplo n.º 11
0
 private void process_Scroll(object sender, EventArgs e)
 {
     Log("process:" + process.Value.ToString());
     LibPlayer.Player_Seek(player, process.Value);
 }
Exemplo n.º 12
0
        private void buttonGetCurpos_Click(object sender, EventArgs e)
        {
            int seconds = LibPlayer.Player_GetCurrentPosition(player);

            curpos.Text = "curpos: " + seconds.ToString() + " s";
        }
Exemplo n.º 13
0
 //List<string> loglist = new List<string>();
 private void buttonClose_Click(object sender, EventArgs e)
 {
     LibPlayer.Player_Close(player);
     Log("Close");
 }
Exemplo n.º 14
0
 private void buttonPlay_Click(object sender, EventArgs e)
 {
     LibPlayer.Player_Play(player);
     Log("Play");
 }