Called in almost all cases with true, so CoInitialize unconditionally.
The only occurence with false in vcap/deck seem to be possible with true
as well - it just does one extra CoInit/CoUninit.
The numeric indices now use the "natural" index as devices given by
IDeckLinkIterator. The idea is to keep the index consistent with previous
versions.
For the devices ordered newly by topological ID, use character indices
instead ('a', 'b' etc.).
Do not advertise numeric indices for now, anyways, even though now left -
it can now be considered as a legacy feature, it can be later added to
the output if considered useful.
Limit lifetime of the returned map to the ranged for scope - the map
actually contains references to IDeckLink devices with deleters.
In probes and helps, it meant that release was called at the block
end, which means in this case that the release occurs right after
decklink_uninitalize(), which is certainly incorrect.
It seems that isn't a big problem in inits - it would be a problem just for
devices in the map after the initialized one (previous are unmanaged
and released) and if init fails (decklink_uninitalize will be called
before the block ends in this case).
Allow device specification by topological ID and also sort according to
it. This is important mainly for 8K Pro subdevices, which are now sorted
in this order:
````
0) 580200) DeckLink 8K Pro (1)
1) 580201) DeckLink 8K Pro (3)
2) 580202) DeckLink 8K Pro (2)
3) 580203) DeckLink 8K Pro (4)
```
The new order actually represent the physical SDI connector order of the
card - the SDIs on the cards from the PCIe slots are Ref In, DeckLink
8K Pro (1), D8K (3), D8K (2), D8K (3).
Replaced all other autoconf-defined platform macros (HAVE_LINUX and
HAVE_MACOSX, WIN32 already done) with those ones defined by compiler.
Not yet remove the definitions from autoconf, in case someone will use
the old macros anyways. Remove in future.
BMD FourCC sometimes end with space, like 'pal '. Although no
BMDDeckLinkAttributeID currently does, we may pad to be simplier to use,
eg. `-t decklink:q=3cc` instead of `-t decklink:q='3cc '`. Also suppresses
potential compiler complains due to using NULL-terminated function on a
"string" that is not terminated in general.
Decrease log level for implicit options returning E_NOTIMPL to info -
perhaps not important at all (like passthrough on old devices) and we
do not want to decrease user attention to warning.s
Allow passing of arbitrary option to DeckLink configuration, eg.:
uv -t decklink:cptm=pdir
via FourCC option name and value (may be also a flag or an int). The
option is passed directly to BMD API.
+ [disp] the condition `s->profile_req == bmdProfileOneSubDeviceHalfDuplex`
was probably inverted - there should perhaps be unequality, because if
not set otherwise, that option is set for quad-link by default
+ when setting the profile automatically, use detected/actual link
configuration to check quad-link, not use the value set by us (may be
set in BMD settings)
+ sort conf_name_map alphabetically
Created bmd_option type that is basically a variant (tagged union) to
encapsulate possible configuration values and also special values for
default and keep. Having this previously in int is cumbersome because
the special values as were defined (0, -1) collide with the default
semantics of bool.
It actually sets `profile=1dfd`. This is a complement to already
existing `half-duplex` option (that has on the other hand more more
complex semantic - it chooses the profile tailored for the device, since
the right one differs for eg. 8K Pro /4dhd/ and Duo/Quad 2 /2dhd/).