I use the ExportSample program, and I want to change some steps. That is, I can use LINE messages to connect. The message will have the IP of the camera and the start date and time. Then it will automatically capture the one minute before and after this time period, and directly output the video.
I suggest you use the GUID of the camera instead of the IP. There are plenty scenarios where the IP in a VMS isn’t a unique identifier for a camera. If you do use it I can perhaps share a snippet to find the right item to use in the exporter code you implement..
using VideoOS.Platform;
using VideoOS.Platform.ConfigurationItems;
private void GetCameraByIP(string ip)
{
var Server = new ManagementServer(Configuration.Instance.ServerFQID);
foreach (var recorder in Server.RecordingServerFolder.RecordingServers)
{
foreach (var hardware in recorder.HardwareFolder.Hardwares.Where(x => x.Address == ip))
{
foreach (var camera in hardware.CameraFolder.Cameras)
{
label1.Text += "Camera " + camera.Name + " id " + camera.Path + Environment.NewLine;
Item cameraItemUseInExport = Configuration.Instance.GetItem(Guid.Parse(camera.Id), Kind.Camera);
label1.Text += "Camera " + cameraItemUseInExport.Name + " id " + cameraItemUseInExport.FQID.ObjectId.ToString() + Environment.NewLine;
}
}
}
}
GetCameraByIP("http://10.100.53.65/");
There is no sample doing what you want exactly, I hope this tip can make it easier for you to change the sample..