Esempio n. 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            // copy libvlc.dll,libvlccore.dll and plugins to current work directory
            player = new VlcPlayer(Environment.CurrentDirectory + "\\plugins\\");
            // show the video in panel1 control
            player.SetRenderWindow((int)panel1.Handle);

            // play rtmp stream
            player.PlayOnline(@"rtmp://192.168.3.245:1935/live/7c02c0bc889c43bf84a8c80f854543e6?sid=973a23d1627146a08c3fd2ff47e25287");
            player.Play();
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            string pluginPath = System.Environment.CurrentDirectory + "\\plugins";

            vlc_player_ = new VlcPlayer(pluginPath);
            IntPtr render_wnd = this.panel1.Handle;

            vlc_player_.SetRenderWindow((int)render_wnd);

            tbVideoTime.Text = "00:00:00/00:00:00";

            is_playinig_ = false;
        }
Esempio n. 3
0
        public Form1()
        {
            InitializeComponent();

            string pluginPath = System.Environment.CurrentDirectory + "\\vlc\\plugins\\";
            vlc_player_ = new VlcPlayer(pluginPath);
            IntPtr render_wnd = this.panel1.Handle;
            vlc_player_.SetRenderWindow((int)render_wnd);

            tbVideoTime.Text = "00:00:00/00:00:00";

            is_playinig_ = false;

            lImg = new Dictionary<int,System.Drawing.Image>();
            starttime = ConfigHelper.GetConfigDecimal("starttime");
            stoptime = ConfigHelper.GetConfigDecimal("stoptime");
        }
Esempio n. 4
0
        public Form1()
        {
            InitializeComponent();

            string pluginPath = System.Environment.CurrentDirectory + "\\vlc\\plugins\\";

            vlc_player_ = new VlcPlayer(pluginPath);
            IntPtr render_wnd = this.panel1.Handle;

            vlc_player_.SetRenderWindow((int)render_wnd);

            tbVideoTime.Text = "00:00:00/00:00:00";

            is_playinig_ = false;

            lImg      = new Dictionary <int, System.Drawing.Image>();
            starttime = ConfigHelper.GetConfigDecimal("starttime");
            stoptime  = ConfigHelper.GetConfigDecimal("stoptime");
        }
Esempio n. 5
0
        private void init()
        {
            PictureBox pic = new PictureBox();
            Bitmap     b   = new Bitmap(Application.StartupPath + @"//images/video.png");

            pic.Image    = b;
            pic.SizeMode = PictureBoxSizeMode.AutoSize;
            pic.Width    = 200;



            int height = 260;

            list = new List <VlcPlayer>();
            string pluginPath = System.Environment.CurrentDirectory + "\\plugins\\";
            int    x          = 0;
            int    y          = 0;
            int    k          = 0;

            for (int i = 0; i < 4; i++)
            {
                if (i % 2 == 0)
                {
                    x = 0;
                    if (i != 0)
                    {
                        y = y + height;
                        if (k > 0)
                        {
                            x = x + this.Width / 2;
                        }
                        k++;
                    }
                }
                else
                {
                    x = this.Width / 2;
                }

                BackgroundPanel panel = new BackgroundPanel();
                panel.Location = new Point(x, y);


                panel.Width  = this.Width / 2;
                panel.Height = height;

                panel.BackgroundImage       = b;
                panel.BackgroundImageLayout = ImageLayout.Center;


                VlcPlayer vlc_player_ = new VlcPlayer(pluginPath);
                IntPtr    render_wnd  = panel.Handle;
                vlc_player_.SetRenderWindow((int)render_wnd);



                list.Add(vlc_player_);

                this.Controls.Add(panel);
            }



            this.ResumeLayout(false);
        }