Step to reproduce:
-
Start MediaLiveViewer component sample, click “Select Camera” button I see 2 cameras there.
-
I added another camera to recording server with Management client.
-
Click “Select Camera” button, I don’t see the newly added camera on list.
I need to exit this problem then start again then see new camera shown on list.
Even I add registerCommunicationFillters like this
onSystemChangedReceiver = _messageCommunication.RegisterCommunicationFilter(OnSystemConfigurationChanged, new VideoOS.Platform.Messaging.CommunicationIdFilter(MessageId.System.SystemConfigurationChangedIndication);
The system configuration event was received but with api call: VideoOS.Platform.Configuration.Instance.GetItemsByKind(Kind.Camera), the new camera is still not shown.
Is it a bug? how could our application get the updated camera list auomatically without restarting our application?
Thanks a lot!
Hi Mr. Cheng,
the application will need to be restarted in order to login again. The RefreshConfiguration works on your plugin only (plugin development only). It is the PlatformDefinitionId that points to your plugin much like GetItemConfigurations that gives you info on your plugin only.
If you want a general configuration change, there is currently no functionality like RefreshConfiguration to invalidate the cached configuration information. When the general configuration has changed, you have to do a RemoveServer, then an AddServer and Login.
You might be able to use MIP Message Communication, MessageId = VideoOS.Platform.Messaging.MessageId.Server.ConfigurationChangedIndication, to find out when to re-login. Make sure not to re-login multiple times within a short time frame. You might end up with an unsuccessful login.
Note:
Further information on MIP Message Communication is in the SDK documentation “Introduction to MIP Message Communication” a.o.
To set it up use -
_obj = _messageCommunication.RegisterCommunicationFilter(MessageHandler, new VideoOS.Platform.Messaging.CommunicationIdFilter(VideoOS.Platform.Messaging.MessageId.Server.ConfigurationChangedIndication));
There is no sample using VideoOS.Platform.Messaging.MessageId.Server.ConfigurationChangedIndication but you can see how the StausViewer sample uses NewEventIndication.
Thanks for your reply. It is really inconvenient for end user to re-login again in order to get new added device, Especially for security business you probably miss critical alarms during processing of re-logon. Could you let your development team /product manager know and discuss if it will be improved in future release? Thanks a lot! Best Regards, Yue
Hi Yue,
after consulting our development team /product manager, we can inform you that we have actually implemented that the MIPSDK, as a component solution, will add new cameras as they are defined.
The specific sample may not update it, but that is just a sample issue – the MIPSDK will add new cameras (For Corporate / Expert). Thank you for your feedback. Really appreciated!
Best regards,
Raul Alvaro Fraser
Backline Support @ Milestone Systems
Hi, Could you give me a new sample which will dynamically load newly added camera without restarting application? In previous answer, it is mentioned as below. I am kind of confused. Thanks. Hi Mr. Cheng, the application will need to be restarted in order to login again. The RefreshConfiguration works on your plugin only (plugin development only). It is the PlatformDefinitionId that points to your plugin much like GetItemConfigurations that gives you info on your plugin only. If you want a general configuration change, there is currently no functionality like RefreshConfiguration to invalidate the cached configuration information. When the general configuration has changed, you have to do a RemoveServer, then an AddServer and Login. You might be able to use MIP Message Communication, MessageId = VideoOS.Platform.Messaging.MessageId.Server.ConfigurationChangedIndication, to find out when to re-login. Make sure not to re-login multiple times within a short time frame. You might end up with an unsuccessful login.
Hi Yue, the component sample ”ConfigAccessViaSDK” does update the camera list in real time.