RecorderStatusService2 question: What are status details for each?

So, some of the thousands of cameras in our client’s enterprise may be physically disconnected or not working for whatever reason. In these instances, our user gets a blank or static screen.

We have been asked to intercept this and provide a clean “Video unavailable” image, so, after connecting with a camera via connect method in the xml protocol, I use:

var recstatus = new RecorderStatusService2(CameraInfo.WebServerAddress);
 var statusSessionId = recstatus.StartStatusSession(LoginInfo.Token);
 recstatus.SubscribeDeviceStatus(LoginInfo.Token, statusSessionId, new[] { CameraInfo.DeviceId });
 
var stats = recstatus.GetStatus(LoginInfo.Token, statusSessionId, 5000);
var cstatus = stats.CameraDeviceStatusArray[0];
 
 recstatus.StopStatusSession(LoginInfo.Token, statusSessionId);

From cstatus, I can see: cstatus.Enabled, cstatus.Started, cstatus.Error and cstatus.ErrorNotConnected.

This is after connecting but before requesting live feed, so I do not want to check an necessary status, so my question is about Enabled and Started: Are these associated with live feed in any way? Is Enabled saying live is enabled? Is Started saying live feed has started?

I ask because we can not debug at client sight and we have a very small XProtect system in our office where all cameras seem to always be Enabled, Started, and Connected, which is different than camera states in our client’s office.

Thanks for any insight.

The possible statuses should be documented on CameraDeviceStatus and the inheritance. - http://doc.developer.milestonesys.com/html/index.html?base=statushelp/class_recorder_status_service2_1_1_device_status_base.html&tree=tree_3.html

Thanks Bo, but they only supply the status and not why the status.

What does it mean to be Enabled, or Started?

It does not say.

You are right, it does not say.

Enabled corresponds with enabled in the Management Client. When not enabled there is no functionality, the camera will even be unknown to the Smart Client.

Started means that the recorder has started the pipeline, but it does not necessarily mean there is camera feed. There is actually no indicator saying there is a feed. After a initialization period if there is ‘Started’ and there is no ‘Error’ then it indicates there is media feed.

IsChange means if you have current state or a shift has happened.

Overview of the states-

public class DeviceStatusBase : StatusBase
{
    public Guid DeviceId;
    public bool IsChange;
    public bool Enabled;
    public bool Started;
    public bool Error;
    public bool ErrorNotLicensed;
    public bool ErrorNoConnection;
}
 
 
public class MediaStreamDeviceStatusBase : DeviceStatusBase
{
    public bool Recording;
    public bool DbMoveInProgress;
    public bool ErrorOverflow;
    public bool ErrorWritingGop;
    public bool DbRepairInProgress;
}
 
public class CameraDeviceStatus : MediaStreamDeviceStatusBase
{
    public bool Motion;
}
 
public class MicrophoneDeviceStatus : MediaStreamDeviceStatusBase
{
}
 
public class SpeakerDeviceStatus : MediaStreamDeviceStatusBase
{
}
 
public class MetadataDeviceStatus : MediaStreamDeviceStatusBase
{
}
 
public class IODeviceStatusBase : DeviceStatusBase
{
    public IOState State;
}
 
public class InputDeviceStatus : IODeviceStatusBase
{
}
 
public class OutputDeviceStatus : IODeviceStatusBase
{
}

I hope this is what you need. I will request an update to the documentation so that this information will get included in a future release of the MIP Documentation.