get h264 stream in MIP SDK

Hello, i was wondering how can i receive H264 stream directly from milestone without the stream being decoded, i currently use this

BitmapSource bitmapSource = new BitmapSource();
bitmapSource.NewBitmapEvent += OnReceiveImageFromMilestone;

and this

jpegVideoSourceController = new JPEGVideoSource(camera);
jpegVideoSourceController.SetKeepAspectRatio(true, true);
jpegVideoSourceController.Width = width;
jpegVideoSourceController.Height = height;
jpegVideoSourceController.SetWidthHeight();
jpegVideoSourceController.Init();

to receive images from a camera but since the program that integrate MIP isnt the one that should display the image, i am forced to send them to the final client through another connection, JPEG frames being very heavy, I can’t have a good framerate and many cameras at the same time, so i would like to receive the H264 stream and directly send it through the connection and decode it just before displaying it, i saw something like “RawVideoSource” that is probably what i’m looking for but what should i do with it ? exactly like JPEGVideoSource ? will this work ? (i don’t even have width/height property in RawVideoSource) also, i don’t really understand the “GenericByteData” format which is supposed to explain the way milestone encapsulate the H264, anyone have more informations about this ?, does it mean that the H264 coming from milestone is not exactly H264 ?

Thanks for an answer

The RawVideoSource works pretty much like JPEGVideoSource, but will return the raw frames without doing any transcoding. The GenericByteData is just a format XProtect uses to encapsulate the data, but if you skip past the header the actual frame is there untouched - just as it was received from the camera.