Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Have the UI and gstreamer in the same process #11

Open
DemiMarie opened this issue Apr 30, 2021 · 2 comments
Open

Have the UI and gstreamer in the same process #11

DemiMarie opened this issue Apr 30, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@DemiMarie
Copy link
Collaborator

This avoids a potential security concern, by ensuring that a UI crash halts video capture.

@ElliotKillick
Copy link
Owner

I did consider a UI crash when I was making this project. I was going to set it up so that the video sender shell script simply waited on the UI Python process and upon seeing it has died, kill the parent process along with all its descendants which includes GStreamer. However, I wanted to get this project out and figured I would implement that precaution later.

Having the UI and GStreamer in the same process would certainly be a more concrete way of going about this than effectively having a "watchdog". This could be done with GI bindings in Python which the GTK UI components are already using and GStreamer supports.

@ElliotKillick ElliotKillick added the enhancement New feature or request label May 1, 2021
@DemiMarie
Copy link
Collaborator Author

I managed to get this working. There is a menu entry that calls os._exit(0) when activated. I chose os._exit(0) because it is the quickest and most reliable way to forcibly tear down the process. The kernel will clean up the webcam state.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants