removed quotation marks - personally it looks better without (it was
ported as it was from GPUJPEG)
+ replace kB units with more correct KiB (already in GPUJPEG)
merge get_technology() and get_default_technology()
- availability of valid technology is now verified by get_technology()
- priority list of technologies is now allowed (eg. "cuda,cpu" (default)
and "cpu,cuda")
- placeholder for GUI set to "cuda", not "gpu"
clean up if failed to set technology (default or user-specified)
If failed print the reason in get_default_technology() not _init()
(it is also so in get_technology()).
- avoid goto - call _done + return NULL instead
- use std::string as a container for cfg instead of alloca
- in j2k_compress_done, mod must be cast directly to the state (priv_data
not set at that point)
The (re)initialization is now in _reconfigure - no need to initialize
it prior to. But move the informative MSG() to reconfigure.
Also removed duplicite headers.
- when no technology at all - it would fail later, anyways
- remove the informative message (just for CPU but not in the opposite
case) - the used device type will then be printed out, anyways
- also assume in _reconfigure that we have valid technology
```
ultragrid/src/video_capture/ximea.c:100:27: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
100 | char path[strlen(XIMEA_LIBRARY_PATH) + 1 + strlen(XIMEA_LIBRARY_NAME) + 1];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
Both XIMEA_LIBRARY_PATH and XIMEA_LIBRARY_NAME are actually char[]
defined in config.h.
Fixes the commit 9c597ae1 (yesterday) - after the move, the ptr must
have been replaced for tok, otherwise passing 2 or more options to gl,
like `-d gl:fs:cursor`, causes segfault.
When pixel format changes - which is almost always if CS doesn't match
the splashscreen and some conversion is needed, the cs_data member needs
to be updated to contain curremt conversion data).
accept the syntax in format <W>x<H>[@<FPS>[<suff>]]
this requires also some changes in parse_fmt, namely:
1. parse the suffix
2. parse fps with strtod - this format should allow 1920x1080@59.94i
3. related with the point 2. - do not adjust 59->59.94 if the above
format used - compared to BMD modes like Hi59, there the 59.94 mode
should be written in full (so 1920x1080@23 will be 23 FPS, indeed)
Do not set bmdDeckLinkConfigOutput1080pAsPsF ('pfpr') to false by
default. Most likely not needed and user may configure the device by
itself according to the needs.
Since now the options can be specified generically by FourCC 'cfpr' (capture) and 'pfpr'
(display), there is no need to have this explicitly.
Also it doesn't seem to be much useful (at least with the PsF stream from
XDCAM, the stream is detected to be interlaced, not progressive, even
though decklink reports BMDDeckLinkSupportsAutoSwitchingPPsFOnInput=yes).