]> git.sesse.net Git - nageru/commit
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)
commitecaec75dd52d076ba53cafa1fed716ebc0d93da6
tree33a58eb7981a9fe543aae237174d6dd4284a74ec
parente131edb9e568383e2700666c6f91394ce895b07f
Make number of cards flexible at runtime.

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.
21 files changed:
nageru/alsa_pool.cpp
nageru/audio_mixer.cpp
nageru/audio_mixer.h
nageru/benchmark_audio_mixer.cpp
nageru/card_type.h [new file with mode: 0644]
nageru/context_menus.cpp
nageru/flags.cpp
nageru/flags.h
nageru/glwidget.cpp
nageru/input_mapping.cpp
nageru/input_mapping.h
nageru/input_mapping_dialog.cpp
nageru/kaeru.cpp
nageru/mixer.cpp
nageru/mixer.h
nageru/print_latency.cpp
nageru/resampling_queue.cpp
nageru/resampling_queue.h
nageru/state.proto
nageru/theme.cpp
nageru/theme.h