[clug] Building a simple UI with pygame, keystrokes and a window focus problem

Hal Ashburner hal at ashburner.info
Wed Feb 23 02:24:26 MST 2011


On 4/Feb/11 2:45 PM, Francis Whittle wrote:
> GStreamer developers would probably tell you to "just write a photobooth
> application in python, it's easy"
>
Ended up doing this, in C. Ditching SDL and reading keystrokes from from 
the ipac kb controller from /dev/input/eventX which takes X out of the 
equations and makes sure your buttons remain responsive.
This seems to work fairly reliably.
GStreamer is a pain to find out the smallish subset of information that 
you actually want or need to do your one thing rather than becoming a 
GStreamer guru/prosletyser/devotee/kool-aid guzzler but when you do, you 
can write a photobooth, with effects in very few lines of code. About 
150 lines of C in this case for a command line version (with the UI code 
elsewhere)

The whole re-write, UI, camera, display w/ filters and a few other bits 
and pieces took less than a full day.

So I guess I really have no right to make that grouchy comment about 
GStreamer above.... ;)


More information about the linux mailing list