-
Notifications
You must be signed in to change notification settings - Fork 0
Reopen views from the main view panel #289
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
Conversation
|
Just made a lot of changes to this PR. Firstly I removed the Unix process class completely. It was way to hard to properly manage the lifecycle of an application in java, so instead I created a systemd service for the camera feed. The PiCamera class now only has to hook into the service in order to control the camera. This removes the possibility of opening two instances of the camera feed at once and simplifies the code greatly. In order to pass command line arguments to the service I made the main eer.service create a runtime directory The pid is also no longer required because we can now just reference the systemd service. Flipping the service can be performed by writing |
|
|
||
| [Service] | ||
| EnvironmentFile=/run/eer/camera-environment | ||
| ExecStart=/usr/bin/eer-camera-feed $host $port No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no newline here
| process = UnixProcess.start("eer-camera", host, String.valueOf(port)); | ||
| private static final Runtime RUNTIME = Runtime.getRuntime(); | ||
|
|
||
| private static final String SERVICE = "eer-camera.service"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you config-ified this and the constructer arg at line 35 you could almost make this generic for managing any service. Probably not necessary for us now tho
ConnorWhalen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good besides that one missing newline
This PR adds the ability to close and reopen views from the main view panel. This change also allows the user to restart the video feed from the main view.
Updates had to be made to the VideoDecoder class in order for this to work (There was a bug waiting for sockets to close,
meaning this fixes #279)The view launcher class is created in the init and passed to the viewloader as an argument. Later when the stage is started, the launcher is passed the viewloader and creates the main stage.