Skip to content

Stream_Interface

With the stream interface, raw samples (e.g. H264 samples) are pushed to rebuild a stream, e.g. to save it to MP4 or to re-stream it.

This feature requires the Datastead RTSP/RTMP/HTTP/ONVIF DirectShow Source filter to be installed first.

  1. Set VideoSource = vs_StreamInterface.
  2. Assign the stream format to StreamInterface_Format (e.g. "h264", "mpegts", "mjpeg", etc.).
  3. Specify the frame rate:

  4. Invoke VideoGrabber.StartPreview() or StartRecording().

  5. Then periodically invoke StreamInterface_PushData to push the samples, e.g. from a timer or another thread.

The sample code is included in the "StreamInterface" demo project of the package.