baudm / mplayer.py

Lightweight Python wrapper for MPlayer
http://pypi.python.org/pypi/mplayer.py
GNU Lesser General Public License v3.0
117 stars 32 forks source link

Question related to GUI #42

Closed darld closed 2 years ago

darld commented 2 years ago

I have a mobile wheeled robot with camera. I using Python script to control it via keyboard. Normally I will open mplayer in the 1st terminal for the camera steaming and open another terminal for controller. My question is whether I can use this wrapper to create a single window to streaming the camera and run my Python script in the background? My robot website: www.opendr.xyz

baudm commented 2 years ago

Hi, thanks for your interest. Short answer: yes you can. The GUI integration code is mainly concerned about integrating with the event loop of the chosen framework. That said, there are many ways to implement what you want to do. The most elegant--in my opinion-- is to make a unified graphical UI with a camera view and graphical controls. Or you can just capture the keyboard events in the same window and run your commands in the background.

I haven't been able to maintain this project recently though. You will have to port the code to the latest PyQt (or GTK) versions.