License key
The Datastead GenICam Vision Source is distributed as one single package: the same binary is used for the evaluation and for the licensed use. There is no separate evaluation build, and nothing has to be reinstalled when a license is purchased.
| State | Behaviour |
|---|---|
| Evaluation, first 30 days on the machine | fully functional: no watermark, no time limit, every pixel format |
| Evaluation expired (no key) | the video keeps streaming, with a permanent text overlay; nothing ever stops, no capture is interrupted |
| Licensed (valid key) | clean stream, no overlay, no expiry |
| Trial key (dated key, for a longer evaluation) | clean stream until the key's expiry date, then back to the overlay |
The 30 days are counted from the first use of the filter on the machine, per Windows account (HKCU\Software\Datastead\DtstdGenicam and %LOCALAPPDATA%\Datastead\).
The key
A license is delivered as one signed key, which can be used in two equivalent ways: as a file dropped on the PC, or as a string passed by the application. Both carry exactly the same signature; pick whichever fits the deployment.
As a file (nothing to code)
Save the DatasteadGenICam.lic delivered with the license as:
%LOCALAPPDATA%\Datastead\DatasteadGenICam.lic
that is C:\Users\<user>\AppData\Local\Datastead\DatasteadGenICam.lic (create the Datastead folder if needed). No administrator rights are required. Restart the application: the video is delivered clean and the About property page shows "Licensed to <name>".
This is the way to license applications that cannot pass a key to a capture filter: OBS Studio, VLC, ffmpeg, AMCap, conferencing and recording tools.
- 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 needs no network access.
- Not bound to the machine: the file contains no hardware identifier. A replaced or reinstalled PC only needs the file copied again.
%LOCALAPPDATA%is per Windows account: on a PC with several accounts, copy the file into the profile of each account that uses the camera. 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.
As a string (from your application)
The same key is also delivered as a DSTD1.... 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, "DSTD1...."); // pName == NULL
pCtrl2->Release();
| Return value | Meaning |
|---|---|
S_OK |
key accepted: the whole process is licensed for its lifetime, for every instance of the filter |
0x80040300 |
malformed key (truncated, or an extra character from a copy/paste) |
0x80040301 |
unknown key id: the key was signed with a key pair this build does not know |
0x80040302 |
bad signature: the key was altered |
0x80040303 |
wrong product: this key belongs to another Datastead product |
0x80040304 |
trial key whose expiry date has passed |
- No camera needs to be open, and the key does not depend on the camera or the machine.
- The key is not persisted: pass it on every run, before the graph starts. Store it in the application, not in a user setting.
- A key accepted this way takes precedence over the license file.
From TVideoGrabber
Requires TVideoGrabber 16.6.2.0 or newer. 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:DSTD1....';
TVideoGrabber then passes the key to the capture filter every time the device is opened. Dropping the .lic file on the PC works just as well and needs no code. See Using from TVideoGrabber.
Which license to buy
The two licenses differ in what they allow, not in the key mechanism:
| License | For | Typical delivery |
|---|---|---|
| Developer license (royalty-free) | applications you build with the TVideoGrabber SDK or with DirectShow and redistribute to end users | the key string, embedded in your application; the end users need no license |
| Workstation license (one per PC) | using the camera from OBS Studio, VLC, ffmpeg, AMCap or any other existing application, without writing code | the .lic file, copied once per PC |
Prices and purchase: https://www.datastead.com/purchase/.
Do not ship a workstation license file with an application
A workstation license covers one PC. An application redistributed to end users needs the developer license.
Longer evaluation
If 30 days are not enough, request a trial key on https://www.datastead.com/genicam-vision-source. It is a dated key that removes the overlay until its expiry date, with no other restriction, and it is installed exactly like a license key (file or string). The Remove-evaluation-overlay-after-30-day-trial.html page at the root of the package points to the same form.
Checking the license state
BOOL licensed; wchar_t who[128];
pCtrl->GetLicenseInfo(&licensed, who, 128);
*pLicensed is TRUE when a valid full or trial key is in force. who receives the licensee name, or the evaluation status when there is no key: "Evaluation: 12 day(s) left", then "Evaluation period expired: www.datastead.com/genicam-vision-source". The same text is shown on the About property page.
The filter never displays a message box (it can run in a service, in session 0): the license state is reported by GetLicenseInfo, on the About page and in the log.
After the evaluation expires
The stream is never interrupted, and every feature keeps working. The only change is the overlay, plus one detail on raw Bayer: a mosaic cannot carry a readable overlay, so once the evaluation has expired the pin no longer offers the raw RGGB format and delivers RGB24 instead (the filter demosaics the BayerRG8 frames itself, then draws the overlay). Applications that explicitly request MEDIASUBTYPE_RGGB get VFW_E_TYPE_NOT_ACCEPTED at connection time in that state; with a valid key, raw Bayer is offered as usual.