Filter install/uninstall
A) Invoking the filter from the TVideoGrabber SDK, without installer neither filter registration
Although TVideoGrabber can use the filter registered in DirectShow with the B) and C) methods described below, it can be more convenient to just copy the filter binaries to a folder, so TVideoGrabber can invoke them without having to run the installer or registering the binaries with regsvr32.exe.
Case 1: if the application targets only x86 or x64, it is enough to copy the corresponding filter binaries (.dll and .ax) into the folder that contains the application executable (.exe).
Case 2: if the application targets both x86 and x64 (e.g. C# or VB.NET built for Any CPU), copy the x86 and x64 folders containing the filter binaries next to the application executable (.exe), so that the application folder contains two "x86" and "x64" subfolders with the respective filter binaries.
Case 3: it is possible to copy both the "x86" and "x64" folders containing the filter binaries to any folder, and to specify this folder to TVideoGrabber with the VideoGrabber.ExtraDLLPath property.
E.g. if the x86 and x64 folders have been copied under "c:\rtspfolder", set:
VideoGrabber.ExtraDLLPath = "c:\rtspfolder"
B) Installing the filter as a standard DirectShow filter with the self installer (DatasteadRTSPFilterInstaller.exe)
The installer will install and register automatically the x86 filter on a 32bit OS, and both the x86 and x64 filters on a 64bit OS.
To install the package automatically from the command line
DatasteadRTSPFilterInstaller.exe /silent
or
DatasteadRTSPFilterInstaller.exe /verysilent
To uninstall the package automatically from the command line
"C:\Program Files\Datastead\Rtsp\unins000.exe"
To install the package manually
Double-click on DatasteadRTSPFilterInstaller.exe, accept each confirmation dialog.
To uninstall the package manually
Windows Settings -> Apps (or Control Panel -> Programs and Features), then uninstall the Datastead RTSP/RTMP/HTTP/ONVIF DirectShow source filter.
C) Registering the filter manually
To install the filter manually:
- run vcredist_x86.exe and/or vcredist_x64.exe, unless the corresponding Visual C++ Redistributable is already installed,
- copy the x86 and/or x64 folders to the target location,
- register the DatasteadRtspSource_x86.ax or DatasteadRtspSource_x64.ax file with regsvr32.exe (the DLLs must be located in the .ax folder).
E.g.:
regsvr32.exe c:\filtersfolder\x86\DatasteadRtspSource_x86.ax
regsvr32.exe c:\filtersfolder\x64\DatasteadRtspSource_x64.ax
To uninstall it, run regsvr32.exe /u, then delete the files. E.g.:
regsvr32.exe /u c:\filtersfolder\x86\DatasteadRtspSource_x86.ax
regsvr32.exe /u c:\filtersfolder\x64\DatasteadRtspSource_x64.ax
A third-party installer normally offers an option to COM-register a binary; it must be applied to the .ax files.
Note 1: what matters is how the application is compiled, not which version of Windows the end user runs:
- application compiled for x64 only (VS.NET target platform set to x64): register only the x64 filter; it requires a 64-bit version of Windows,
- application compiled for x86 only (VS.NET target platform set to x86): register only the x86 filter; it runs on both 32-bit and 64-bit versions of Windows,
- application compiled for both x86 and x64 (target platform set to Any CPU): register the x86 filter on 32-bit versions of Windows, and both the x86 and the x64 filters on 64-bit versions of Windows.
Note 2: the x86 DLLs must stay in the folder that contains DatasteadRtspSource_x86.ax, and the x64 DLLs in the folder that contains DatasteadRtspSource_x64.ax. Registering an .ax file whose DLLs are missing fails, or the filter fails to load later.
Demo projects
Using the filter through the TVideoGrabber SDK
The filter is natively supported by our TVideoGrabber SDK, which builds and manages the DirectShow graphs automatically.
To use the filter from the TVideoGrabber SDK:
- install the filter as explained above,
- download and unzip the TVideoGrabber SDK,
- check the filter installation by running the pre-compiled MainDemo.exe: open the "IP camera" tab, enter an RTSP URL and click "Start preview"; if the preview appears the filter is correctly installed and MainDemo.exe can be closed,
- locate the MainDemo project corresponding to the development language used,
- open the MainDemo project and compile it,
- run it and go to the "IP Camera" tab, enter the RTSP URL and click "Start preview" to verify all is working correctly.
The TVideoGrabber sample code to start the preview and MP4 recording of RTSP URLs is explained in the Using from TVideoGrabber chapter.
Building the DirectShow graph
This package includes several demo projects that are provided as sample code and can be reused:
Microsoft DirectShow SDK (C++): a simple C++ demo project derived from PlayCap, with synchronous connection.
C# with DirectShow .NET: the package includes a C# demo project based on DirectShow.NET and derived from PlayCap, with asynchronous connection (the filter does not block the main thread while connecting; for more information see DirectShow configuration).