]> git.sesse.net Git - nageru/commitdiff
Make number of cards flexible at runtime.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 30 May 2020 16:29:38 +0000 (18:29 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Jun 2020 08:03:08 +0000 (10:03 +0200)
This is a cleanup that should really have been done when we added
hotplug in the first place, but it's becoming even more relevant
now that SRT “cards” are supported.

Basically, empty slots can now be filled with nothing instead of
fake capture cards (which generate frames and take a little bit
of CPU time); we only instantiate fake capture cards if the slot is
below some certain minimum index or has been used by the theme.
(Cards that are unused are now “inactive” and will generally not
show up in the UI.) This means that the --num-cards parameter is now
largely irrelevant; it is only there for guaranteeing a minimum
amount of fake cards, for testing. Most users will be happy just using the
default of 2. There's also a new --max-num-cards in the unlikely case
that you want to leave some cards unused, e.g. for other applications
on the same machine.

This also unifies handling of regular capture cards, FFmpeg “cards”
and CEF “cards”; they are indexed pretty much the same way.


No differences found