I use the MIPS SDK class “VideoOS.Platform.Client.ImageViewerControl”. I correctly display my video stream sent by SmartClient on my solution. This feed provided could indicate “the camera is offline” or “attempting to connect to the server”. I want to retrieve information that the stream sent by the SmartClient contains that of the camera.
Code :
private void ShowRTVideo()
{
CloseRTVideo();
try
{
_imageViewerControl1 = ClientControl.Instance.GenerateImageViewerControl();
_imageViewerControl1.Dock = DockStyle.Fill;
panel1.Controls.Clear();
panel1.Controls.Add(_imageViewerControl1);
_imageViewerControl1.CameraFQID = _SelectedCamera.FQID;
// Lets enable/disable the header based on the tick mark. Could also disable LiveIndicator or CameraName.
_imageViewerControl1.EnableVisibleHeader = true;
_imageViewerControl1.EnableVisibleLiveIndicator = EnvironmentManager.Instance.Mode == Mode.ClientLive;
_imageViewerControl1.EnableMousePtzEmbeddedHandler = false;
_imageViewerControl1.MaintainImageAspectRatio = true;
_imageViewerControl1.SetVideoQuality(0, 1);
_imageViewerControl1.Initialize();
_imageViewerControl1.Connect();
RTStreamDisplayed = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error opening stream", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}