License key
The evaluation version overlays an evaluation watermark on every frame and limits the raw Bayer output to 60 seconds. The licensed version, delivered after the purchase of a license, removes both once a valid license is available to the filter. Without a valid license, the licensed filter overlays a "license key missing" notice instead.
Two licenses exist, and they differ only in the way the license reaches the filter:
| License | For | How the license reaches the filter |
|---|---|---|
| Developer license (royalty-free) | applications built with the TVideoGrabber SDK or with DirectShow, redistributed to end users | the application passes a license key at run time |
| Workstation license (one per PC) | using the camera from OBS Studio, VLC, ffmpeg, AMCap or any other DirectShow application, without writing code | a license file is copied once on the PC |
Note
Neither the key nor the license file can unlock the evaluation package: the evaluation build ignores them. Install the licensed package to use them.
Developer license: passing the key at run time
The key is a text string, passed at run time through IGenicamControl2::SetFeatureValueString with a NULL feature name, before the graph starts:
IGenicamControl2* pCtrl2;
pFilter->QueryInterface(IID_IGenicamControl2, (void**)&pCtrl2);
HRESULT hr = pCtrl2->SetFeatureValueString(NULL, "<license key>"); // pName == NULL
pCtrl2->Release();
| Return value | |
|---|---|
S_OK |
key accepted: the whole process is licensed for its lifetime, for every instance of the filter |
E_INVALIDARG |
key rejected (mistyped, or not a key of this product) |
E_NOTIMPL |
evaluation version, which ignores the key |
- No camera needs to be open, and the key does not depend on the camera or the machine.
- The key is not persisted: the application passes it on every run, before the graph starts. Store it in the application, not in a user setting.
- Once accepted, the About property page shows "Licensed to
" , andIGenicamControl::GetLicenseInforeturnsTRUEwith the licensee name.
From TVideoGrabber
Assign the key to the LicenseString property, prefixed with the DTSTDGEN: product identifier, once at startup (before the first preview or recording):
VideoGrabber1.LicenseString := 'DTSTDGEN:<license key>';
TVideoGrabber then passes the key to the capture filter itself, every time the device is opened. See Using from TVideoGrabber.
Workstation license: the license file
Applications such as OBS Studio, VLC or ffmpeg cannot pass a key to the filter. For them, the workstation license is a license file, DatasteadGenICam.lic, issued to your name or company and sent after the purchase. Copied once on the PC, it unlocks the filter for every application running on that PC. One license is needed per PC.
- Install the licensed package (see Installation).
- Copy
DatasteadGenICam.licto the%LOCALAPPDATA%\Datastead\folder of the Windows account that runs the application, i.e.C:\Users\<user>\AppData\Local\Datastead\DatasteadGenICam.lic(create theDatasteadfolder if it does not exist). No administrator rights are needed. -
Start (or restart) the application: the video is delivered without watermark, and the About property page shows "Licensed to
" . -
No activation, no internet access: the file is a signed text file, verified locally by the filter. No activation server is involved, and the PC does not need any network access.
- Not bound to the machine: the file contains no hardware identifier. A replaced or reinstalled PC only needs the file copied again. The license terms allow one PC in use per license.
- The file is read when the filter is created: after copying it, restart the application.
%LOCALAPPDATA%is specific to each Windows account: on a PC with several accounts, copy the file in the profile of each account that uses the camera (this is still one PC, so one license). An application running as a service uses the profile of its service account.- Do not edit the file: any change to its content invalidates the signature, and the filter falls back to the "license key missing" state.
Do not ship the license file with an application
A license file is licensed for one PC. An application redistributed to end users needs the developer license, whose key is embedded in the application.
Checking the license state
BOOL licensed; wchar_t who[128];
pCtrl->GetLicenseInfo(&licensed, who, 128);
// licensed == TRUE, who == L"<licensee name>"
GetLicenseInfo reports the licensee of the key accepted at run time if there is one, otherwise the licensee of the license file.
Redistribution
The developer license is a royalty-free developer license: the licensed filter and its runtime DLLs are redistributed with the application, with the key embedded in the application. The end users do not need a license.
The workstation license is not a redistribution license: it covers the PC on which the license file is installed.