Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;
            VlcControl control = (VlcControl)btn.Tag;
            VlcMedia media = control.GetCurrentMedia();

            if (btn.Text == "Rec.")
            {
                control.Stop();
                string[] prms = new string[] { ":sout=#duplicate{dst=std{access=file,mux=mp4,dst='" + media.Title.Substring(7).Replace("/", "_").Replace(":", "-") + ".mp4'},dst=display}" };
                control.Play(new Uri(media.Mrl), prms);
                control.Refresh();
                btn.Text = "Stop";
            }
            else
            {
                control.Stop();
                string[] prms = new string[] { "" };
                control.Play(new Uri(media.Mrl), prms);
                btn.Text = "Rec.";
            }
        }