private void Rebind() { _mjpegConnection.Disconnect(); _mjpegConnection.Connect(_url); _connector.Connect(_mjpegConnection.VideoChannel, _bitmapSourceProvider); Start(); }
private void start_button_Click(object sender, EventArgs e) { try { if (mjpegConnection != null) { mjpegConnection.Disconnect(); } if (!mjpegConnection.Connect("http://" + vclient_ipaddress + ":" + client_videoport, 100000)) { MessageBox.Show("Connection failed - mjpegConnection."); } if (!vconnector.Connect(mjpegConnection.VideoChannel, zoom)) { MessageBox.Show("Connection failed - connector zoom."); } if (!vconnector.Connect(zoom, vprovider)) { MessageBox.Show("Connection failed - connector provider."); } vvideoViewer.Start(); groupBox.Controls.Add(vvideoViewer); //client if (!this.connected) { IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse(vclient_ipaddress), int.Parse(client_auport)); this.codec = new AcmMuLawChatCodec(); this.ClientConnect(endPoint, codec); } else { this.ClientDisconnect(); } start_button.Enabled = false; close_button.Enabled = true; } catch (Exception ex) { lblStatus.Text = ex.ToString() + "\n" + lblStatus.Text; } }
private void btnConnect3_Click(object sender, EventArgs e) { try { if (_mjpegConnection3 != null) { _mjpegConnection3.Disconnect(); } var config3 = new OzMJPEGClient_Config(bunifuMaterialTextbox9.Text, bunifuMaterialTextbox11.Text, bunifuMaterialTextbox12.Text); _mjpegConnection3 = new MJPEGConnection(config3); _mjpegConnection3.Connect(); _connector3.Connect(_mjpegConnection3.VideoChannel, _bitmapSourceProvider3); _connector3.Connect(_mjpegConnection3.VideoChannel, _snapShot3); videoViewerWF3.Start(); } catch (Exception ex) { Console.WriteLine(ex.Message); MessageBox.Show("Please enter IP, Username and Password !"); } }
private void materialFlatButton1_Click(object sender, EventArgs e) { try { if (_mjpegConnection1 != null) { _mjpegConnection1.Disconnect(); } var config1 = new OzMJPEGClient_Config(bunifuMaterialTextbox4.Text, bunifuMaterialTextbox1.Text, bunifuMaterialTextbox2.Text); _mjpegConnection1 = new MJPEGConnection(config1); _mjpegConnection1.Connect(); _connector1.Connect(_mjpegConnection1.VideoChannel, _bitmapSourceProvider1); _connector1.Connect(_mjpegConnection1.VideoChannel, _snapShot1); _videoSender = _mjpegConnection1.VideoChannel; videoViewerWF1.Start(); } catch (Exception ex) { Console.WriteLine(ex.Message); MessageBox.Show("Please enter IP, Username and Password !"); } }