I'm using Driver Framework to create a custom driver. How should I forward an h264 over Rtsp video stream to the VMS?

Which is the method to use the GetLiveFrame and send directly the h264 stream without decoding it. Should the individual NALs be sent inside the data field? The DemoDriver only shows how to use MJPEG (frame by frame).

We don’t have any samples to show how to use H.264 but It is the same way as JPEG, frame by frame.

Hello Rie

do you mean that the driver should decode the H264 stream?

Meantime I’ve solved setting the correct values in the VideoHeader class: codec type H.264, SyncFrame = true only for IDR NALs. TimestampFrame and TimestampSync must be precise. I’ve sent the data of each frame (I-Frame and P-Frame) as the payload of each H264 NAL. Everything now seems to work correctly. In this way I’ve left XProtect core decoding the H264.

I hope this is the right way to follow.

if there are any contraindications please let me know because I will proceed with the decoding on the driver side.

Thanks a lot

Diego

You should not decode. What you have done and described is correct, thank you for the description.