private void buttonDestroyPlayer_Click(object sender, EventArgs e) { timerForPlaying.Stop(); Log("StopTimer"); LibPlayer.DestroyPlayer(player); Log("DestroyPlayer"); }
private void buttonCreatePlayer_Click(object sender, EventArgs e) { player = LibPlayer.CreatePlayer(); Log("CreatePlayer"); timerForPlaying.Start(); Log("StartTimer"); }
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(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { timerForPlaying.Stop(); Log("StopTimer"); LibPlayer.DestroyPlayer(player); Log("DestroyPlayer"); LibPlayer.DestroyRender(render); Log("DestroyRender"); }
private void Form1_Load(object sender, EventArgs e) { render = LibPlayer.CreateRender(Handle); Log("CreateRender"); player = LibPlayer.CreatePlayer(); Log("CreatePlayer"); timerForPlaying.Start(); Log("StartTimer"); }
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); }
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); } } }
private void buttonRenderOneFrame_Click(object sender, EventArgs e) { LibPlayer.RenderOneFrame(render, player); }
private void buttonReleaseGL_Click(object sender, EventArgs e) { LibPlayer.DestroyRender(render); Log("DestroyRender"); }
private void buttonInitializeGL_Click(object sender, EventArgs e) { render = LibPlayer.CreateRender(Handle); Log("CreateRender"); }
private void process_Scroll(object sender, EventArgs e) { Log("process:" + process.Value.ToString()); LibPlayer.Player_Seek(player, process.Value); }
private void buttonGetCurpos_Click(object sender, EventArgs e) { int seconds = LibPlayer.Player_GetCurrentPosition(player); curpos.Text = "curpos: " + seconds.ToString() + " s"; }
//List<string> loglist = new List<string>(); private void buttonClose_Click(object sender, EventArgs e) { LibPlayer.Player_Close(player); Log("Close"); }
private void buttonPlay_Click(object sender, EventArgs e) { LibPlayer.Player_Play(player); Log("Play"); }