gmlGrabber class reference

static methods

gmlGrabber --list

Return the list of available video sources.

constructor

gmlGrabber objectName ?-name       grabberName?
                      ?-bitmapName bitmapName?
                      ?-reduce     factor?
                      ?-share      flagShare?

Create a video capture object named objectName. If name is specified, use that video source. If bitmapName is specified, create a gmlBitmap object named bitmapName that will contain the latest captured frame. factor specifies a decimation factor for the captured frames (one of 1, 2 or 4). It defaults to 1. flagShare specifies whether the grabber object will be shared (thus accessible through another grabber object that uses the Shared Memory driver. It defaults to 1 (sharing enabled).

object methods

objectName getBitmap bitmapName

Create a gmlBitmap object named bitmapName that will contain the latest captured frame.

objectName bind   eventName ?script?
objectName unbind eventName ?script?

Register or un-register the Tcl script to evaluate on every event of type eventName.

  • hasFrame is triggered every time the driver captures a frame;
  • newFrame is triggered every time the bitmap object created using getBitmap or the constructor contains a new frame;
  • dispose is triggered when the object dies.

Note that hasFrame will be triggered less often that newFrame (this is refered to as "frame dropping"), in particular if the client does heavy processing.

objectName settingsDialog

If possible, display a system-level dialog box that allows the user to control capture parameters.

objectName dispose

Destroy the object and any associated bitmaps.