mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Minor comment fixes
This commit is contained in:
parent
d1b27a33d8
commit
fc485af1be
@ -146,6 +146,8 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the best format in our _pformats vector.
|
||||
// MJPEG is preferred over YUYV, as it's much smaller.
|
||||
_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
pvector<uint32_t>::iterator it;
|
||||
for (it = src->_pformats.begin(); it != src->_pformats.end(); ++it) {
|
||||
@ -168,14 +170,10 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) {
|
||||
return;
|
||||
}
|
||||
|
||||
// No interlacing
|
||||
_format->fmt.pix.field = V4L2_FIELD_NONE;
|
||||
|
||||
// This really should be there, but for
|
||||
// some reason it causes weird memory corruption.
|
||||
|
||||
// Request a format of this size, and no interlacing
|
||||
_format->fmt.pix.width = _size_x;
|
||||
_format->fmt.pix.height = _size_y;
|
||||
_format->fmt.pix.field = V4L2_FIELD_NONE;
|
||||
|
||||
// Now politely ask the driver to switch to this format
|
||||
if (-1 == ioctl(_fd, VIDIOC_S_FMT, _format)) {
|
||||
@ -211,6 +209,7 @@ WebcamVideoCursorV4L(WebcamVideoV4L *src) : MovieVideoCursor(src) {
|
||||
vision_cat.error() << "Not enough memory!\n";
|
||||
}
|
||||
|
||||
// Set up the mmap buffers
|
||||
struct v4l2_buffer buf;
|
||||
for (int i = 0; i < _bufcount; ++i) {
|
||||
memset(&buf, 0, sizeof buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user