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 TypeHandle get_class_type(void)
double get_fps(void) const

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

static int get_num_options(void)

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 PointerTo<WebcamVideo> get_option(int n)

Returns the nth webcam option.

std::string const &get_pixel_format(void) const

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

int get_size_x(void) const

Returns the camera’s size_x.

int get_size_y(void) const

Returns the camera’s size_y.

void output(std::ostream &out) const

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