add VLC link
This commit is contained in:
25
StreamViewer.Designer.cs
generated
25
StreamViewer.Designer.cs
generated
@@ -58,6 +58,8 @@ namespace robospot_camera_finder
|
|||||||
labelSerial = new Label();
|
labelSerial = new Label();
|
||||||
tbSerial = new TextBox();
|
tbSerial = new TextBox();
|
||||||
btnSidePanel = new Button();
|
btnSidePanel = new Button();
|
||||||
|
lblRtspLink = new Label();
|
||||||
|
tbRtspLink = new TextBox();
|
||||||
((System.ComponentModel.ISupportInitialize)videoView).BeginInit();
|
((System.ComponentModel.ISupportInitialize)videoView).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)tbZoom).BeginInit();
|
((System.ComponentModel.ISupportInitialize)tbZoom).BeginInit();
|
||||||
grpSACN.SuspendLayout();
|
grpSACN.SuspendLayout();
|
||||||
@@ -338,6 +340,8 @@ namespace robospot_camera_finder
|
|||||||
//
|
//
|
||||||
// splitContainerMain.Panel1
|
// splitContainerMain.Panel1
|
||||||
//
|
//
|
||||||
|
splitContainerMain.Panel1.Controls.Add(tbRtspLink);
|
||||||
|
splitContainerMain.Panel1.Controls.Add(lblRtspLink);
|
||||||
splitContainerMain.Panel1.Controls.Add(labelSerial);
|
splitContainerMain.Panel1.Controls.Add(labelSerial);
|
||||||
splitContainerMain.Panel1.Controls.Add(tbSerial);
|
splitContainerMain.Panel1.Controls.Add(tbSerial);
|
||||||
splitContainerMain.Panel1.Controls.Add(btnSidePanel);
|
splitContainerMain.Panel1.Controls.Add(btnSidePanel);
|
||||||
@@ -386,6 +390,25 @@ namespace robospot_camera_finder
|
|||||||
btnSidePanel.UseVisualStyleBackColor = true;
|
btnSidePanel.UseVisualStyleBackColor = true;
|
||||||
btnSidePanel.Click += btnSidePanel_Click;
|
btnSidePanel.Click += btnSidePanel_Click;
|
||||||
//
|
//
|
||||||
|
// lblRtspLink
|
||||||
|
//
|
||||||
|
lblRtspLink.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
|
lblRtspLink.AutoSize = true;
|
||||||
|
lblRtspLink.Location = new Point(296, 483);
|
||||||
|
lblRtspLink.Name = "lblRtspLink";
|
||||||
|
lblRtspLink.Size = new Size(57, 15);
|
||||||
|
lblRtspLink.TabIndex = 7;
|
||||||
|
lblRtspLink.Text = "RTSP Link";
|
||||||
|
//
|
||||||
|
// tbRtspLink
|
||||||
|
//
|
||||||
|
tbRtspLink.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
|
tbRtspLink.Location = new Point(359, 480);
|
||||||
|
tbRtspLink.Name = "tbRtspLink";
|
||||||
|
tbRtspLink.ReadOnly = true;
|
||||||
|
tbRtspLink.Size = new Size(383, 23);
|
||||||
|
tbRtspLink.TabIndex = 8;
|
||||||
|
//
|
||||||
// StreamViewer
|
// StreamViewer
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
@@ -443,5 +466,7 @@ namespace robospot_camera_finder
|
|||||||
private Button btnPreset4;
|
private Button btnPreset4;
|
||||||
private Button btnPreset3;
|
private Button btnPreset3;
|
||||||
private Button btnPreset2;
|
private Button btnPreset2;
|
||||||
|
private TextBox tbRtspLink;
|
||||||
|
private Label lblRtspLink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,12 +60,15 @@ namespace robospot_camera_finder
|
|||||||
cam_ip = ip;
|
cam_ip = ip;
|
||||||
this.Text = name;
|
this.Text = name;
|
||||||
|
|
||||||
|
string rtsp_link = "rtsp://" + ip + "/profile2/media.smp";
|
||||||
|
|
||||||
updateZoomSlider();
|
updateZoomSlider();
|
||||||
|
|
||||||
tbSerial.Text = camera.camera_serial;
|
tbSerial.Text = camera.camera_serial;
|
||||||
|
tbRtspLink.Text = rtsp_link;
|
||||||
|
|
||||||
videoView.MediaPlayer = _mp;
|
videoView.MediaPlayer = _mp;
|
||||||
var media = new Media(_libVLC, new Uri("rtsp://" + ip + "/profile2/media.smp"));
|
var media = new Media(_libVLC, new Uri(rtsp_link));
|
||||||
media.AddOption(":network-caching=25");
|
media.AddOption(":network-caching=25");
|
||||||
_mp.Play(media);
|
_mp.Play(media);
|
||||||
media.Dispose();
|
media.Dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user