Lines Matching refs:handle
95 /* Handle to the opened camera device. */
96 int handle;
256 cd->handle = -1;
267 /* Closing handle will also disconnect from the driver. */
268 if (lcd->handle >= 0) {
269 close(lcd->handle);
287 * reset camera device by reopening its handle. Otherwise attempts to set up new
303 /* Reset device handle. */
304 close(cd->handle);
305 cd->handle = open(cd->device_name, O_RDWR | O_NONBLOCK, 0);
307 if (cd->handle >= 0) {
310 _xioctl(cd->handle, VIDIOC_CROPCAP, &cropcap);
313 _xioctl (cd->handle, VIDIOC_S_CROP, &crop);
334 if(_xioctl(cd->handle, VIDIOC_REQBUFS, &req)) {
363 if(_xioctl(cd->handle, VIDIOC_QUERYBUF, &buf) < 0) {
371 cd->handle, buf.m.offset);
383 if (_xioctl(cd->handle, VIDIOC_QBUF, &buf) < 0) {
411 if(_xioctl(cd->handle, VIDIOC_REQBUFS, &req)) {
449 if (_xioctl(cd->handle, VIDIOC_QBUF, &buf) < 0) {
509 /* Open handle to the device, and query device capabilities. */
510 cd->handle = open(cd->device_name, O_RDWR | O_NONBLOCK, 0);
511 if (cd->handle < 0) {
516 if (_xioctl(cd->handle, VIDIOC_QUERYCAP, &cd->caps) < 0) {
520 close(cd->handle);
521 cd->handle = -1;
526 close(cd->handle);
527 cd->handle = -1;
536 close(cd->handle);
537 cd->handle = -1;
570 if(_xioctl(cd->handle, VIDIOC_ENUM_FRAMESIZES, &size_enum)) {
612 if(_xioctl(cd->handle, VIDIOC_ENUM_FRAMESIZES, &size_enum)) {
684 if(_xioctl(cd->handle, VIDIOC_ENUM_FMT, &fmt_enum)) {
708 if(_xioctl(cd->handle, VIDIOC_ENUM_FMT, &fmt_enum)) {
819 _xioctl(cd->handle, VIDIOC_CROPCAP, &cropcap);
822 _xioctl (cd->handle, VIDIOC_S_CROP, &crop);
844 if (cd->handle < 0) {
855 if (_xioctl(cd->handle, VIDIOC_S_FMT, &fmt) < 0) {
915 if (_xioctl (cd->handle, VIDIOC_STREAMON, &type) < 0) {
937 if (cd->handle < 0) {
950 if (_xioctl(cd->handle, VIDIOC_STREAMOFF, &type) < 0) {
986 if (cd->handle < 0) {
998 read(cd->handle, buff + total_read_bytes,
1029 const int res = _xioctl(cd->handle, VIDIOC_DQBUF, &buf);
1051 if (_xioctl(cd->handle, VIDIOC_QBUF, &buf) < 0) {