6 import gfxprim
.core
as core
7 import gfxprim
.backends
as backends
8 import gfxprim
.input as input
9 import gfxprim
.grabbers
as grabbers
12 # Open grabber (i.e. web camera)
13 grabber
= grabbers
.GrabberV4L2Init("/dev/video0", 320, 240);
17 bk
= backends
.BackendX11Init(None, 0, 0, grabber
.frame
.w
, grabber
.frame
.h
, "Grabbers test", 0)
20 # Start grabber capture
28 grabber
.frame
.Blit(0, 0, bk
.context
, 0, 0, grabber
.frame
.w
, grabber
.frame
.h
)
38 if (ev
.type == input.EV_KEY
):
40 elif (ev
.type == input.EV_SYS
):
41 if (ev
.code
== input.EV_SYS_QUIT
):
44 if __name__
== '__main__':