Nocontrols flag to facilitate "headless mode" #143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I encountered a Problem when trying to run droidcam-cli in a "headless" mode. The client tries to listen for input to trigger control events this prevents it from running in the background. Since I never really need control events I thought it to be a nice addition to droidcam if it were possible to turn this behaviour off
I have prepared the necessary codechanges as per Discussion on issue 141
What was done
no_controls
-nocontrols
flag to setno_controls
no_controls
before executing wait_command()I have checked if this works as intended locally and have verified that -nocontrols does indeed allow droidcam to run in the background, while ommitting this flag does not.
Without the flag droidcam will continue functioning as intended and the commands can be entered and work.
I'm happy to include any other changes deemed necessary or best-practice, since this is my first time working with C.