We have a 32bit WPF application. We want to make a “MileStone Component Integration” using MIP SDK. Our goal is to communicate with MileStone VMS and determine the PTZ Type(Absolute or Continuous or Relative) of a particular camera.
To implement playback streaming we are referring the MileStone’s sample application “PlaybackWpfUser”
In our application, within the same Window we are using two VideoOS.Platform.Client.ImageViewerControl: one for live and other for playback streaming. For playback, along with the ImageViewerControl, we are also using the PlaybackWpfUserControl.
Live camera streaming is working fine. But we are always getting the message “No recordings available” for playback streaming.
My code for Playback streaming is as follows:
XAML
xmlns:platformclient=“clr-namespace:VideoOS.Platform.Client;assembly=VideoOS.Platform”
<platformclient:ImageViewerWpfControl x:Name=“_playbackImageViewerControl” />
<platformclient:PlaybackWpfUserControl x:Name=“_playbackUserControl” Visibility=“Visible” Grid.Row=“1”/>
.CS
FQID _playbackFQID;
_imageViewerControl.Disconnect();
_playbackImageViewerControl.Disconnect();
_playbackImageViewerControl.EnableDigitalZoom = false;
_playbackImageViewerControl.MaintainImageAspectRatio = true;
_playbackImageViewerControl.EnableVisibleHeader = true;
_playbackImageViewerControl.EnableVisibleCameraName = true;
_playbackImageViewerControl.EnableVisibleLiveIndicator = true;
_playbackImageViewerControl.EnableVisibleTimestamp = true;
if (_playbackFQID == null)
{
_playbackFQID = ClientControl.Instance.GeneratePlaybackController();
_playbackUserControl.Init(_playbackFQID);
}
EnvironmentManager.Instance.Mode = Mode.ClientPlayback;
_playbackUserControl.SetCameras(new List() { SelectedCamera.FqId });
_playbackImageViewerControl.PlaybackControllerFQID = _playbackFQID;
_playbackImageViewerControl.CameraFQID = SelectedCamera.FqId;
_playbackImageViewerControl.Initialize();
_playbackImageViewerControl.Connect();
_playbackImageViewerControl.Selected = true;
if(alreadyVisited == 1)
{
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(
MessageId.SmartClient.PlaybackCommand,
new PlaybackCommandData() { Command = PlaybackData.PlayStop }), _playbackFQID);
}
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(
MessageId.SmartClient.PlaybackCommand,
new PlaybackCommandData() { Command = PlaybackData.Goto, DateTime = startTime.ToUniversalTime() }), \_playbackFQID);
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(
MessageId.SmartClient.PlaybackCommand,
new PlaybackCommandData() { Command = PlaybackData.PlayForward, Speed = playBackSpeed }), _playbackFQID);