I am writing a command line program (component integration) which queries the server for information about cameras. I’ve succeeded in returning much about the camera, (e.g, online status, ip address, ptz, etc)… I would like to figure out how many days of recorded video exist for the camera… or at least the number of days of recorded video for the server itself.
Thank you for this, but I have some concerns: In the ConfigAPI it seems like these values come back in a freeform “container”, but are not strongly typed. This seems great as metadata for the purpose of creating a “wrapper” type of UI, but less so for machine-to-machine consumption. This example above does not “know” fields are going to be on that page ahead of time… but rather gets a freeform container back that has an object with a description “Retention time”, of integer type, with current value 10080.
What I am trying to do is write a program that will be able to get this data from the server in all cases. What if the server is configured in French or Spanish? Will that field still be labeled “Retention time” or the localized equivalent?
In order to get how many recording time has a camera you can use JPEGVideoSource class, methods GetBegin() and GetEnd() will return both snapshot and related timestamp
The Configuration API as used in the Config API Client can be replaced by simpler code using strongly typed classes, I recommend doing so, I will illustrate this.
Please click following link and see the last answer from Josh.