panda3d.vision.WebcamVideo

class WebcamVideo

Bases: MovieVideo

Allows you to open a webcam or other video capture device as a video stream.

Inheritance diagram

Inheritance diagram of WebcamVideo

static getNumOptions() → int

Returns the number of webcam options. An “option” consists of a device plus a set of configuration parameters. For example, “Creative Webcam Live at 640x480, 30 fps” is an option.

static getOption(n: int) → WebcamVideo

Returns the nth webcam option.

Return type

WebcamVideo

getSizeX() → int

Returns the camera’s size_x.

getSizeY() → int

Returns the camera’s size_y.

getFps() → float

Returns the camera’s framerate. This is a maximum theoretical: the actual performance will depend on the speed of the hardware.

getPixelFormat() → str

Returns the camera’s pixel format, as a FourCC code, if known.

output(out: ostream) → None

Outputs the WebcamVideo. This function simply writes the name, size and FPS to the output stream.

static getClassType() → TypeHandle
Return type

TypeHandle

getOptions() → list
property options

Returns the nth webcam option.

Return type

Sequence[PointerTo_WebcamVideo]