Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nocontrols flag to facilitate "headless mode" #143

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

JohSchillerEmnify
Copy link
Contributor

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

  • Added variable definition for no_controls
  • Added check for -nocontrols flag to set no_controls
  • Added check for 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.

@JohSchillerEmnify JohSchillerEmnify changed the title for -nocontrols flag (var definition, var assignment, check for var before waitcommand ()) Nocontrols flag to facilitate "headless mode" Feb 16, 2021
@aramg aramg merged commit 8c8df64 into dev47apps:master Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants