I was trying to use VideoWallSetCamerasCommandData to configure
four cameras to be displayed on an monitor with 2x2 layout.
Let the following “drawing” my monitor on Smart Wall of
Milestone XProtect Smart Client, with A, B, C and D as the monitor screen:
---------------------
| A | B |
---------------------
| C | D |
---------------------
______||_______
And I want to:
- send FQID of camera 4 to screen A;
- send FQID of camera 3 to screen B;
- send FQID of camera 2 to screen C;
- send FQID of camera 1 to screen D;
Those cameras will be sorted and displayed as follow:
---------------------
| 4 | 3 |
---------------------
| 2 | 1 |
---------------------
______||_______
I also tried sending with two/more identical FQIDs so that two/more of the screens will be displaying the video feed from the same camera, but only one will be displayed.
Expected outcome:
---------------------
| 4 | 3 |
---------------------
| 3 | 1 |
---------------------
______||_______
Actual outcome:
---------------------
| 4 | 3 |
---------------------
| 1 | null |
---------------------
______||_______
Attached with my code snippets below.
//1 add target cameras FQID into collection, including null camera FQID
Collection<FQID> CollectionCameraFQID = new Collection<FQID>();
//2 add camera object to collection, where cam1,cam4, cam3 and cam2 are FQIDs of camera objects.
CollectionCameraFQID.Add(cam4);
CollectionCameraFQID.Add(cam3);
CollectionCameraFQID.Add(cam2);
CollectionCameraFQID.Add(cam1);
//3 Initialize VideoWallSetCamerasCommandData
VideoWallSetCamerasCommandData VMS_SetCameras = new VideoWallSetCamerasCommandData
{
CameraFQIDList = CollectionCameraFQID,
Position = 1
};
//4 Compile message
VMS_message = new VideoOS.Platform.Messaging.Message(MessageId.Control.VideoWallSetCamerasCommand, VMS_SetCameras);
//5 Send message to video wall
EnvironmentManager.Instance.SendMessage(VMS_message, VMS_FQIDSelectedMonitor);
I found a solution by dividing and sending them in four commands with only only one camera FQID and different position for each of the command,
but the performance is slow.