Open DemiMarie opened 3 years ago
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.
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.
This avoids a potential security concern, by ensuring that a UI crash halts video capture.