mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
patch from eryx
This commit is contained in:
parent
f75eb5e15c
commit
5b74526c15
@ -196,6 +196,15 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) {
|
|||||||
_size_x = _format->fmt.pix.width;
|
_size_x = _format->fmt.pix.width;
|
||||||
_size_y = _format->fmt.pix.height;
|
_size_y = _format->fmt.pix.height;
|
||||||
|
|
||||||
|
struct v4l2_streamparm streamparm;
|
||||||
|
memset(&streamparm, 0, sizeof streamparm);
|
||||||
|
streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
streamparm.parm.capture.timeperframe.numerator = 1;
|
||||||
|
streamparm.parm.capture.timeperframe.denominator = src->_fps;
|
||||||
|
if (ioctl(_fd, VIDIOC_S_PARM, &streamparm) < 0) {
|
||||||
|
vision_cat.error() << "Driver rejected framerate!\n";
|
||||||
|
}
|
||||||
|
|
||||||
struct v4l2_requestbuffers req;
|
struct v4l2_requestbuffers req;
|
||||||
memset(&req, 0, sizeof req);
|
memset(&req, 0, sizeof req);
|
||||||
req.count = 4;
|
req.count = 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user