ElliotKillick / qubes-video-companion

Securely stream webcams and share screens across virtual machines. Project moved: https://github.com/QubesOS/qubes-video-companion
MIT License
52 stars 14 forks source link

Have the UI and gstreamer in the same process #11

Open DemiMarie opened 3 years ago

DemiMarie commented 3 years ago

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

ElliotKillick commented 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.

DemiMarie commented 3 years ago

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.