I’m currently using and ImageViewerClass that has been configured to receive/listen to LiveStreamInformationEvents. When I unplug the internet connection to an individual I.P. cameras, I immediately detect an event with a LiveStreamInformationEventArgs containing the string: ("id=“5” value=“1”), which I interpret this to mean a “loss of connection” to the camera.
I’ve recently added multiple, analog cameras to an encoder box via coaxial cables. When I unplug the internet cable from the encoder box, I again get a “loss of connection” event. However, if I unplug one or more of the coaxial cables to the cameras from the encoder box, I lose video display but I do not detect any “loss of camera” events. IS there a (preferred) method to detect loss/restoration of signal to an analog camera if it is disconnected/reconnected from the encoder box?
Thanks.
When the encoder loose connection to the analogue camera, the camera can send a “Video Loss” message to the recording server. You can setup this event to trigger an alarm in the system. You can listen for the event using MIP SDK methods. The “Video Loss” message does not make the system change the status of the camera as seen in the Smart Client camera view or in LiveStreamInformationEventArgs.
Bo - Thank you for your reply. Just to make sure I understand, I would be looking for a “Video Loss” event? What MIP SDK Class do you recommend using to handle the event? Are there and MIP SDK examples I can use as reference?
Thanks again!
Thank you for getting back on this, I feel now my answer was too short.
First you must configure the Video Loss event. In the Management Client pick the camera, in the properties pane pick the Events tab, click Add to add an event, in the Select Driver Event dialog pick Video Loss and click OK.
I believe most supported encoder devices support the use of Video Loss event, but unfortunately not all. You can check your device in the Supported Hardware pages and check if supported events include a Video Loss event.
With the event configured you can as mentioned create alarms or monitor the event using MIP SDK method.
The recommended method using MIP SDK is to subscribe to NewEventsIndication, this is best illustrated with the StatusViewer sample (alternatively the Alarms and Events Viewer sample).
Bo
Thanks - that’s exactly what I needed to get started! FYI - I’ve managed to complete the first part (i.e., added Video Loss events to all my cameras). I’ll take a look at the samples you suggested.
Mark
Bo - Using your advice and the StatusViewer as an example, my code can now detect and handle “Video Loss” events. It looks like each NewEventsIndication event has a unique FQID associated with it that, in my case, corresponds to a loss of video. I’m sure I’m missing something obvious, but is there a direct way to associate these events with the camera that has suffered the loss of video? Thanks again.
In the StatusViewer sample -
BaseEvent baseEvent = message.Data as BaseEvent;
if (baseEvent != null)
{
BeginInvoke(new MethodInvoker(delegate()
{
UpdateState(baseEvent.EventHeader.Source.FQID,
baseEvent.EventHeader.Message);
}));
}
As I do not have a device at hand to check with I am asking, is baseEvent.EventHeader.Source.FQID not the FQID of the camera?
For a single I.P. camera, I believe the baseEvent.EventHeader.Source.FQID is the FQID of the camera. For Analog cameras connected to an encoder box, it does NOT appear to be FQID of the camera.
I’m currently testing with 4 Analog cameras connected to a single encoder box. I associated 2 Hardware Events, “Video Loss” and “Video Reconnect”, with each of my 4 cameras for a total of 8 possible events. The baseEvent.EventHeader.Source.FQID for each of these 8 events appears to be different.
Perhaps I’ve not configured things correctly?
I’ve also noticed that both my code, as well as the StatusViewer example, randomly seem to “miss” Video Loss and/or Video Reconnect events. I.E., most of the time, if I unplug a camera, I detect a Video Loss event in the debugger. Sometimes, however, I do not detect Video Loss if the camera is unplugged. The same is true for reconnecting the camera: sometimes I detect a Video Reconnect event, sometimes I do not.
Thanks again!
I would expect the FQID to be different in a way that tell you which of the cameras/encoder channels experience the events.
I would try to run the ConfigAccesViaSDK sample and explore device and camera items, I hope it helps understanding what belongs with what..
If events do not happens as expected, I think this should be trouble-shot without adding the complexity of the MIP SDK, you can setup a Smart Client alarm list to show events instead of alarms, it would give you a clear view if the events happens or fails to happen.
I’ll give these a try. Thank you again for your help.