Using standard Milestone stream management into custom driver

I’m developing a MIP Driver with specific actions for connected cameras, but I’d like to maintain the standard Milestone management for stream (using ONVIF). At the moment if I register the camera with my driver, the stream channel is missing, also if I declare a streammanager using standard constructors.

I mean that inside the driver Container, I tried to declare this:

base.StreamManager = new VideoOS.Platform.DriverFramework.Managers.SessionEnabledStreamManager(this);

I also tried to implement my own class derived from SessionEnabledStreamManager and not implementing any override method.

I tried to implement the override methods and returning directly the base default methods.

Any hint, please?

Thank you.

Hi,

I’m not sure I correctly understand what it is you’re trying to achieve. The streams available on a camera need to be reported by the driver, if you take a look at the demo driver you can see how it’s done in the DemoConfigurationManager. There is no default handling implemented in the driver framework, so you will have to parse the data and pass it in yourself, regardless of the format (see the StreamManager classes in the demo driver for examples of how to do this). It’s up to you to provide the handling inside GetLiveFrame, or specifically GetLiveFrameInternal.

If this doesn’t give you the information you need, could you try to better describe what you are doing, exactly?

Best regards,

Simon Rønneberg

Hi and thx for feedback.

Basically in my driver I need only to manage the connection to the camera, the HW information fetching method and the connection status check, which are custom. I’d like to maintain the stream (and also events) management the same as when I use the Universal driver, because the stream is a standard h264 RTSP stream ONVIF compliant and also events are working correctly using the standard driver.

If I have mandatory also to manage the stream and events into the driver, is there an example or a way to simply get stream/events from the camera and redirect them to Milestone?

Thank you and best regards.

Hi, sadly it isn’t possible to reuse functionality from the universal driver this way. The DemoDriver has a lot of commentary on how to implement the functionality for an H.264 stream, but we don’t have an example sadly. I recommend looking in the DemoVideoStreamSession at the implementation of GetLiveFrameInternal.

Some pitfalls to be aware of: Be careful with your sync timestamp, it needs to match up with the latest keyframe’s timestamp; if you’re using asynchronous communication, be careful with your sequence numbers (they need to be in order).

Otherwise, there aren’t too many differences. The codec type should of course be set to H.264, and the SyncFrame boolean should only be true if it is a keyframe.

Best regards,

Simon Rønneberg