To use the filter with the Datastead
TVideoGrabber SDK just ignore all the other chapters in this
documentation, you just need to install the filter and then use the
following TVideoGrabber sample code, in the examples below for an
Axis IP Camera.
Note:
The TvideoGrabber SDK starts by default
the RTSP filter asynchronously, so invoking StartPreview() or
StartRecording() returns true if the URL syntax is connect and exits
immediately without waiting for the connection to complete, a
notification occurs later when the preview or recording starts by the
OnPreviewStarted or OnRecordingStarted events (a connection that
fails is reported by the OnLog event)
(to make the
connection to be sychrone and wait when invoking StartPreview,
disable the VideoGrabber.OpenURLAsync property)
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "onvif://192.168.0.25"
VideoGrabber.SetAuthentication (at_IPCamera, "onvifuser", "onvifpassword");
VideoGrabber.StartPreview()
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "onvif://192.168.0.25"
VideoGrabber.SetAuthentication
(at_IPCamera, "onvifuser",
"onvifpassword");
VideoGrabber.VideoRenderer =
vr_None;
VideoGrabber.FrameGrabber =
fg_Disabled;
VideoGrabber.RecordingMethod = rm_MP4;
VideoGrabber.StartRecording()
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "rtsp://192.168.0.25/axis-media/media.amp?videocodec=h264"
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.StartPreview()
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "rtsp://192.168.0.25/axis-media/media.amp?videocodec=h264&audio=1"
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.AudioDeviceRendering = true
VideoGrabber.StartPreview()
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "rtsp://192.168.0.25/axis-media/media.amp?videocodec=h264"
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.RecordingMethod = rm_MP4
VideoGrabber.RecordingFileName = "c:\thefolder\thefilename.MP4" (*)
VideoGrabber.StartRecording()
VideoGrabber.VideoSource = vs_IPCamera
VideoGrabber.IPCameraURL = "rtsp://192.168.0.25/axis-media/media.amp?videocodec=h264&audio=1"
VideoGrabber.SetAuthentication (at_IPCamera, "root", "admin");
VideoGrabber.AudioDeviceRendering = true
VideoGrabber.RecordingMethod = rm_MP4
VideoGrabber.AudioRecording = true
VideoGrabber.RecordingFileName = "c:\thefolder\thefilename.MP4" (*)
VideoGrabber.StartRecording()
(we suppose the recording is currently running)
VideoGrabber.RecordToNewFileNow("c:\thefolder\thenewfilename.mp4", true)
To let TvideoGrabber generate the file names automatically pass an empty string as file name.
To pause the recording, pass a "nul"
file name with the same extension and without file path,
e.g:
VideoGrabber.RecordToNewFileNow("nul.mp4",
true)
(we suppose the recording is currently running)
To pause the recording, invoke:
DatasteadRtspSourceConfig.Action (RTSP_Action_PauseRecording, "");
To resume the recording, invoke:
DatasteadRtspSourceConfig.Action (RTSP_Action_ResumeRecording, "");