voctomix
voctomix copied to clipboard
Document Config-File
Write a actually useful documentation about all Options of the Config-File and their interaction. Give Examples.
Probably in the Github Wiki or, better, as Markdown (which is versioned and bundled with the Code) compiled and pushed to github pages.
Found a weird configuration issue with the following configuration values:
[previews]
enabled=true
use=true
According to the only occurrences in videodisplay.py:24
use_previews = (Config.getboolean('previews', 'enabled') and
Config.getboolean('previews', 'use'))
and voctogui.py:168
# Warn when connecting to a non-local core without preview-encoders enabled
# The list-comparison is not complete
# (one could use a local hostname or the local system ip),
# but it's only here to warn that one might be making a mistake
use_previews = (Config.getboolean('previews', 'enabled') and
Config.getboolean('previews', 'use'))
both can only be used together or not. At least I would like to change the and
into and or
so that one can use one or the other. And if so, which one would you prefer?
Indeed the more I think about it, the more I would just rename that attribute to encoded
for better understanding and leave the others for compatibility. I will describe this now in the configuration documentation which I am currently working on. Then we can discuss this issue.
@fightling I wonder what configuration file you're looking at.
The intention for this options is that previews.enabled
is server-side config, while previews.use
is client-side config.
The server will only provide preview (scaled, encoded) streams, if previews.enabled
is set. The client can then independently control whether to use those streams by setting prviews.use
.
Of course the streams can only be used, when the server actually provides them, which is why voctogui always checks both options.
Note that the voctogui config does not have to explicitly specify previews.enabled
, it merges the server-side config into its own.
I am looking at the default-config.ini of voctogui. And indeed there is no enabled
item in it. But what you say me makes totally sense now for the code. When voctogui gets a merge of the server configuration then checking both is not confusing to me any more. Thanks for the hint.