Update logs
This commit is contained in:
@ -29,7 +29,7 @@ int v4l2_buffer_open(buffer_t *buf)
|
||||
v4l2_buf.memory = V4L2_MEMORY_DMABUF;
|
||||
}
|
||||
|
||||
E_XIOCTL(buf_list, dev->v4l2->dev_fd, VIDIOC_QUERYBUF, &v4l2_buf, "Cannot query buffer %d", index);
|
||||
ERR_IOCTL(buf_list, dev->v4l2->dev_fd, VIDIOC_QUERYBUF, &v4l2_buf, "Cannot query buffer %d", index);
|
||||
|
||||
uint64_t mem_offset = 0;
|
||||
|
||||
@ -51,7 +51,7 @@ int v4l2_buffer_open(buffer_t *buf)
|
||||
v4l2_exp.type = v4l2_buf.type;
|
||||
v4l2_exp.index = buf->index;
|
||||
v4l2_exp.plane = 0;
|
||||
E_XIOCTL(buf_list, dev->v4l2->dev_fd, VIDIOC_EXPBUF, &v4l2_exp, "Can't export queue buffer=%u to DMA", index);
|
||||
ERR_IOCTL(buf_list, dev->v4l2->dev_fd, VIDIOC_EXPBUF, &v4l2_exp, "Can't export queue buffer=%u to DMA", index);
|
||||
buf->dma_fd = v4l2_exp.fd;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ int v4l2_buffer_enqueue(buffer_t *buf, const char *who)
|
||||
v4l2_buf.timestamp.tv_sec = buf->captured_time_us / (1000LL * 1000LL);
|
||||
v4l2_buf.timestamp.tv_usec = buf->captured_time_us % (1000LL * 1000LL);
|
||||
|
||||
E_XIOCTL(buf, buf->buf_list->dev->v4l2->dev_fd, VIDIOC_QBUF, &v4l2_buf, "Can't queue buffer.");
|
||||
ERR_IOCTL(buf, buf->buf_list->dev->v4l2->dev_fd, VIDIOC_QBUF, &v4l2_buf, "Can't queue buffer.");
|
||||
|
||||
return 0;
|
||||
|
||||
@ -141,7 +141,7 @@ int v4l2_buffer_list_dequeue(buffer_list_t *buf_list, buffer_t **bufp)
|
||||
v4l2_buf.m.planes = &v4l2_plane;
|
||||
}
|
||||
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_DQBUF, &v4l2_buf, "Can't grab capture buffer (flags=%08x)", v4l2_buf.flags);
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_DQBUF, &v4l2_buf, "Can't grab capture buffer (flags=%08x)", v4l2_buf.flags);
|
||||
|
||||
buffer_t *buf = *bufp = buf_list->bufs[v4l2_buf.index];
|
||||
if (buf_list->v4l2->do_mplanes) {
|
||||
|
@ -12,7 +12,7 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
buf_list->v4l2 = calloc(1, sizeof(buffer_list_v4l2_t));
|
||||
|
||||
struct v4l2_capability v4l2_cap;
|
||||
E_XIOCTL(dev, dev->v4l2->dev_fd, VIDIOC_QUERYCAP, &v4l2_cap, "Can't query device capabilities");
|
||||
ERR_IOCTL(dev, dev->v4l2->dev_fd, VIDIOC_QUERYCAP, &v4l2_cap, "Can't query device capabilities");
|
||||
|
||||
if (buf_list->do_capture) {
|
||||
if (v4l2_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) {
|
||||
@ -21,7 +21,7 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
buf_list->v4l2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
buf_list->v4l2->do_mplanes = true;
|
||||
} else {
|
||||
E_LOG_ERROR(dev, "Video capture is not supported by device: %08x", v4l2_cap.capabilities);
|
||||
LOG_ERROR(dev, "Video capture is not supported by device: %08x", v4l2_cap.capabilities);
|
||||
}
|
||||
} else {
|
||||
if (v4l2_cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) {
|
||||
@ -30,7 +30,7 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
buf_list->v4l2->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
|
||||
buf_list->v4l2->do_mplanes = true;
|
||||
} else {
|
||||
E_LOG_ERROR(dev, "Video output is not supported by device: %08x", v4l2_cap.capabilities);
|
||||
LOG_ERROR(dev, "Video output is not supported by device: %08x", v4l2_cap.capabilities);
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,15 +52,15 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
if (strstr(buf_list->name, "JPEG") || strstr(buf_list->name, "H264") || buf_list->do_capture && strstr(buf_list->name, "ISP")) {
|
||||
width = shrink_to_block(width, 32);
|
||||
height = shrink_to_block(height, 32);
|
||||
E_LOG_VERBOSE(buf_list, "Adapting size to 32x32 block: %dx%d vs %dx%d", orig_width, orig_height, width, height);
|
||||
LOG_VERBOSE(buf_list, "Adapting size to 32x32 block: %dx%d vs %dx%d", orig_width, orig_height, width, height);
|
||||
}
|
||||
|
||||
if (format == V4L2_PIX_FMT_H264) {
|
||||
bytesperline = 0;
|
||||
}
|
||||
|
||||
E_LOG_DEBUG(buf_list, "Get current format ...");
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_G_FMT, &fmt, "Can't set format");
|
||||
LOG_DEBUG(buf_list, "Get current format ...");
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_G_FMT, &fmt, "Can't set format");
|
||||
|
||||
if (buf_list->v4l2->do_mplanes) {
|
||||
fmt.fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG;
|
||||
@ -87,8 +87,8 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
//fmt.fmt.pix.sizeimage = bytesperline * orig_height;
|
||||
}
|
||||
|
||||
E_LOG_DEBUG(buf_list, "Configuring format (%s)...", fourcc_to_string(format).buf);
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_S_FMT, &fmt, "Can't set format");
|
||||
LOG_DEBUG(buf_list, "Configuring format (%s)...", fourcc_to_string(format).buf);
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_S_FMT, &fmt, "Can't set format");
|
||||
|
||||
if (buf_list->v4l2->do_mplanes) {
|
||||
buf_list->fmt_width = fmt.fmt.pix_mp.width;
|
||||
@ -103,22 +103,22 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
}
|
||||
|
||||
if (bytesperline > 0 && buf_list->fmt_bytesperline != bytesperline) {
|
||||
E_LOG_ERROR(buf_list, "Requested bytesperline=%u. Got %u.",
|
||||
LOG_ERROR(buf_list, "Requested bytesperline=%u. Got %u.",
|
||||
bytesperline, buf_list->fmt_bytesperline);
|
||||
}
|
||||
|
||||
if (buf_list->fmt_width != width || buf_list->fmt_height != height) {
|
||||
if (bytesperline) {
|
||||
E_LOG_ERROR(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u.",
|
||||
LOG_ERROR(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u.",
|
||||
width, height, buf_list->fmt_width, buf_list->fmt_height);
|
||||
} else {
|
||||
E_LOG_INFO(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u. Accepted",
|
||||
LOG_INFO(buf_list, "Requested resolution=%ux%u is unavailable. Got %ux%u. Accepted",
|
||||
width, height, buf_list->fmt_width, buf_list->fmt_height);
|
||||
}
|
||||
}
|
||||
|
||||
if (format && buf_list->fmt_format != format) {
|
||||
E_LOG_ERROR(buf_list, "Could not obtain the requested format=%s; driver gave us %s",
|
||||
LOG_ERROR(buf_list, "Could not obtain the requested format=%s; driver gave us %s",
|
||||
fourcc_to_string(format).buf,
|
||||
fourcc_to_string(buf_list->fmt_format).buf);
|
||||
}
|
||||
@ -133,14 +133,14 @@ int v4l2_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned heig
|
||||
v4l2_req.type = buf_list->v4l2->type;
|
||||
v4l2_req.memory = buf_list->do_mmap ? V4L2_MEMORY_MMAP : V4L2_MEMORY_DMABUF;
|
||||
|
||||
E_LOG_DEBUG(buf_list, "Requesting %u buffers", v4l2_req.count);
|
||||
LOG_DEBUG(buf_list, "Requesting %u buffers", v4l2_req.count);
|
||||
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_REQBUFS, &v4l2_req, "Can't request buffers");
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_REQBUFS, &v4l2_req, "Can't request buffers");
|
||||
if (v4l2_req.count < 1) {
|
||||
E_LOG_ERROR(buf_list, "Insufficient buffer memory: %u", v4l2_req.count);
|
||||
LOG_ERROR(buf_list, "Insufficient buffer memory: %u", v4l2_req.count);
|
||||
}
|
||||
|
||||
E_LOG_DEBUG(buf_list, "Got %u buffers", v4l2_req.count);
|
||||
LOG_DEBUG(buf_list, "Got %u buffers", v4l2_req.count);
|
||||
return v4l2_req.count;
|
||||
|
||||
error:
|
||||
@ -150,7 +150,7 @@ error:
|
||||
int v4l2_buffer_list_set_stream(buffer_list_t *buf_list, bool do_on)
|
||||
{
|
||||
enum v4l2_buf_type type = buf_list->v4l2->type;
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, do_on ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, &type, "Cannot set streaming state");
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, do_on ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, &type, "Cannot set streaming state");
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
@ -28,8 +28,8 @@ int v4l2_buffer_list_refresh_states(buffer_list_t *buf_list)
|
||||
for (int i = 0; i < buf_list->nbufs; i++) {
|
||||
v4l2_buf.index = i;
|
||||
|
||||
E_XIOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_QUERYBUF, &v4l2_buf, "Can't query buffer (flags=%08x)", i);
|
||||
E_LOG_INFO(buf_list, "Buffer: %d, Flags: %08x. Offset: %d", i, v4l2_buf.flags,
|
||||
ERR_IOCTL(buf_list, buf_list->dev->v4l2->dev_fd, VIDIOC_QUERYBUF, &v4l2_buf, "Can't query buffer (flags=%08x)", i);
|
||||
LOG_INFO(buf_list, "Buffer: %d, Flags: %08x. Offset: %d", i, v4l2_buf.flags,
|
||||
buf_list->v4l2->do_mplanes ? v4l2_plane.m.mem_offset : v4l2_buf.m.offset);
|
||||
}
|
||||
|
||||
|
@ -10,18 +10,18 @@ int v4l2_device_open(device_t *dev)
|
||||
|
||||
dev->v4l2->dev_fd = open(dev->path, O_RDWR|O_NONBLOCK);
|
||||
if (dev->v4l2->dev_fd < 0) {
|
||||
E_LOG_ERROR(dev, "Can't open device: %s", dev->path);
|
||||
LOG_ERROR(dev, "Can't open device: %s", dev->path);
|
||||
goto error;
|
||||
}
|
||||
|
||||
E_LOG_INFO(dev, "Device path=%s fd=%d opened", dev->path, dev->v4l2->dev_fd);
|
||||
LOG_INFO(dev, "Device path=%s fd=%d opened", dev->path, dev->v4l2->dev_fd);
|
||||
|
||||
E_LOG_DEBUG(dev, "Querying device capabilities ...");
|
||||
LOG_DEBUG(dev, "Querying device capabilities ...");
|
||||
struct v4l2_capability v4l2_cap;
|
||||
E_XIOCTL(dev, dev->v4l2->dev_fd, VIDIOC_QUERYCAP, &v4l2_cap, "Can't query device capabilities");
|
||||
ERR_IOCTL(dev, dev->v4l2->dev_fd, VIDIOC_QUERYCAP, &v4l2_cap, "Can't query device capabilities");
|
||||
|
||||
if (!(v4l2_cap.capabilities & V4L2_CAP_STREAMING)) {
|
||||
E_LOG_ERROR(dev, "Device doesn't support streaming IO");
|
||||
LOG_ERROR(dev, "Device doesn't support streaming IO");
|
||||
}
|
||||
|
||||
strcpy(dev->bus_info, v4l2_cap.bus_info);
|
||||
@ -55,8 +55,8 @@ int v4l2_device_set_decoder_start(device_t *dev, bool do_on)
|
||||
|
||||
cmd.cmd = do_on ? V4L2_DEC_CMD_START : V4L2_DEC_CMD_STOP;
|
||||
|
||||
E_LOG_DEBUG(dev, "Setting decoder state %s...", do_on ? "Start" : "Stop");
|
||||
E_XIOCTL(dev, dev->v4l2->dev_fd, VIDIOC_DECODER_CMD, &cmd, "Cannot set decoder state");
|
||||
LOG_DEBUG(dev, "Setting decoder state %s...", do_on ? "Start" : "Stop");
|
||||
ERR_IOCTL(dev, dev->v4l2->dev_fd, VIDIOC_DECODER_CMD, &cmd, "Cannot set decoder state");
|
||||
|
||||
return 0;
|
||||
|
||||
@ -69,8 +69,8 @@ int v4l2_device_video_force_key(device_t *dev)
|
||||
struct v4l2_control ctl = {0};
|
||||
ctl.id = V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME;
|
||||
ctl.value = 1;
|
||||
E_LOG_DEBUG(dev, "Forcing keyframe ...");
|
||||
E_XIOCTL(dev, dev->v4l2->dev_fd, VIDIOC_S_CTRL, &ctl, "Can't force keyframe");
|
||||
LOG_DEBUG(dev, "Forcing keyframe ...");
|
||||
ERR_IOCTL(dev, dev->v4l2->dev_fd, VIDIOC_S_CTRL, &ctl, "Can't force keyframe");
|
||||
return 0;
|
||||
|
||||
error:
|
||||
@ -88,8 +88,8 @@ int v4l2_device_set_fps(device_t *dev, int desired_fps)
|
||||
setfps.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
setfps.parm.output.timeperframe.numerator = 1;
|
||||
setfps.parm.output.timeperframe.denominator = desired_fps;
|
||||
E_LOG_DEBUG(dev, "Configuring FPS ...");
|
||||
E_XIOCTL(dev, dev->v4l2->dev_fd, VIDIOC_S_PARM, &setfps, "Can't set FPS");
|
||||
LOG_DEBUG(dev, "Configuring FPS ...");
|
||||
ERR_IOCTL(dev, dev->v4l2->dev_fd, VIDIOC_S_PARM, &setfps, "Can't set FPS");
|
||||
return 0;
|
||||
error:
|
||||
return -1;
|
||||
|
@ -14,11 +14,11 @@ int v4l2_device_open_media_device(device_t *dev)
|
||||
{
|
||||
struct stat st;
|
||||
if (fstat(dev->v4l2->dev_fd, &st) < 0) {
|
||||
E_LOG_ERROR(dev, "Cannot get fstat");
|
||||
LOG_ERROR(dev, "Cannot get fstat");
|
||||
return -1;
|
||||
}
|
||||
if (~st.st_mode & S_IFCHR) {
|
||||
E_LOG_ERROR(dev, "FD is not char");
|
||||
LOG_ERROR(dev, "FD is not char");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ int v4l2_device_open_media_device(device_t *dev)
|
||||
struct dirent **namelist;
|
||||
int n = scandir(path, &namelist, NULL, NULL);
|
||||
if (n < 0) {
|
||||
E_LOG_ERROR(dev, "Cannot scan: %s", path);
|
||||
LOG_ERROR(dev, "Cannot scan: %s", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ int v4l2_device_open_media_device(device_t *dev)
|
||||
sprintf(path, "/dev/%s", namelist[n]->d_name);
|
||||
ret = open(path, O_RDWR);
|
||||
if (ret >= 0) {
|
||||
E_LOG_VERBOSE(dev, "Opened '%s' (fd=%d)", path, ret);
|
||||
LOG_VERBOSE(dev, "Opened '%s' (fd=%d)", path, ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ int v4l2_device_open_v4l2_subdev(device_t *dev, int subdev)
|
||||
|
||||
media_fd = v4l2_device_open_media_device(dev);
|
||||
if (media_fd < 0) {
|
||||
E_LOG_ERROR(dev, "Cannot find media controller");
|
||||
LOG_ERROR(dev, "Cannot find media controller");
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@ -82,26 +82,26 @@ int v4l2_device_open_v4l2_subdev(device_t *dev, int subdev)
|
||||
|
||||
char link[256];
|
||||
if ((rc = readlink(path, link, sizeof(link)-1)) < 0) {
|
||||
E_LOG_ERROR(dev, "Cannot readlink '%s'", path);
|
||||
LOG_ERROR(dev, "Cannot readlink '%s'", path);
|
||||
}
|
||||
link[rc] = 0;
|
||||
|
||||
char *last = strrchr(link, '/');
|
||||
if (!last) {
|
||||
E_LOG_ERROR(dev, "Link '%s' for '%s' does not end with '/'", link, path);
|
||||
LOG_ERROR(dev, "Link '%s' for '%s' does not end with '/'", link, path);
|
||||
}
|
||||
|
||||
if (strstr(last, "/v4l-subdev") != last) {
|
||||
E_LOG_ERROR(dev, "Link '%s' does not contain '/v4l-subdev'", link, path);
|
||||
LOG_ERROR(dev, "Link '%s' does not contain '/v4l-subdev'", link, path);
|
||||
}
|
||||
|
||||
sprintf(path, "/dev%s", last);
|
||||
ret = open(path, O_RDWR);
|
||||
if (ret < 0) {
|
||||
E_LOG_ERROR(dev, "Cannot open '%s' (ret=%d)", path, ret);
|
||||
LOG_ERROR(dev, "Cannot open '%s' (ret=%d)", path, ret);
|
||||
}
|
||||
|
||||
E_LOG_INFO(dev, "Opened '%s' (fd=%d)", path, ret);
|
||||
LOG_INFO(dev, "Opened '%s' (fd=%d)", path, ret);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -126,8 +126,8 @@ int v4l2_device_set_pad_format(device_t *dev, unsigned width, unsigned height, u
|
||||
fmt.format.colorspace = V4L2_COLORSPACE_RAW;
|
||||
fmt.format.field = V4L2_FIELD_ANY;
|
||||
|
||||
E_LOG_DEBUG(dev, "Configuring mpad %d (subdev_fd=%d)...", fmt.pad, dev->v4l2->subdev_fd);
|
||||
E_XIOCTL(dev, dev->v4l2->subdev_fd, VIDIOC_SUBDEV_S_FMT, &fmt, "Can't configure mpad %d (subdev_fd=%d)", fmt.pad, dev->v4l2->subdev_fd);
|
||||
LOG_DEBUG(dev, "Configuring mpad %d (subdev_fd=%d)...", fmt.pad, dev->v4l2->subdev_fd);
|
||||
ERR_IOCTL(dev, dev->v4l2->subdev_fd, VIDIOC_SUBDEV_S_FMT, &fmt, "Can't configure mpad %d (subdev_fd=%d)", fmt.pad, dev->v4l2->subdev_fd);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
@ -13,8 +13,8 @@ int v4l2_device_set_option_by_id(device_t *dev, const char *name, uint32_t id, i
|
||||
|
||||
ctl.id = id;
|
||||
ctl.value = value;
|
||||
E_LOG_DEBUG(dev, "Configuring option %s (%08x) = %d", name, id, value);
|
||||
E_XIOCTL(dev, dev->v4l2->subdev_fd >= 0 ? dev->v4l2->subdev_fd : dev->v4l2->dev_fd, VIDIOC_S_CTRL, &ctl, "Can't set option %s", name);
|
||||
LOG_DEBUG(dev, "Configuring option %s (%08x) = %d", name, id, value);
|
||||
ERR_IOCTL(dev, dev->v4l2->subdev_fd >= 0 ? dev->v4l2->subdev_fd : dev->v4l2->dev_fd, VIDIOC_S_CTRL, &ctl, "Can't set option %s", name);
|
||||
return 0;
|
||||
error:
|
||||
return -1;
|
||||
@ -33,14 +33,14 @@ static int v4l2_device_query_control_iter_id(device_t *dev, int fd, uint32_t *id
|
||||
device_option_normalize_name(qctrl.name, qctrl.name);
|
||||
|
||||
if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
|
||||
E_LOG_VERBOSE(dev, "The '%s' is disabled", qctrl.name);
|
||||
LOG_VERBOSE(dev, "The '%s' is disabled", qctrl.name);
|
||||
return 0;
|
||||
} else if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) {
|
||||
E_LOG_VERBOSE(dev, "The '%s' is read-only", qctrl.name);
|
||||
LOG_VERBOSE(dev, "The '%s' is read-only", qctrl.name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
E_LOG_VERBOSE(dev, "Available control: %s (%08x, type=%d)",
|
||||
LOG_VERBOSE(dev, "Available control: %s (%08x, type=%d)",
|
||||
qctrl.name, qctrl.id, qctrl.type);
|
||||
|
||||
dev->v4l2->controls = reallocarray(dev->v4l2->controls, dev->v4l2->ncontrols+1, sizeof(device_v4l2_control_t));
|
||||
@ -83,7 +83,7 @@ int v4l2_device_set_option(device_t *dev, const char *key, const char *value)
|
||||
|
||||
if (!control) {
|
||||
ret = 0;
|
||||
E_LOG_ERROR(dev, "The '%s=%s' was failed to find.", key, value);
|
||||
LOG_ERROR(dev, "The '%s=%s' was failed to find.", key, value);
|
||||
}
|
||||
|
||||
switch(control->control.type) {
|
||||
@ -95,8 +95,8 @@ int v4l2_device_set_option(device_t *dev, const char *key, const char *value)
|
||||
.id = control->control.id,
|
||||
.value = atoi(value)
|
||||
};
|
||||
E_LOG_INFO(dev, "Configuring option %s (%08x) = %d", control->control.name, ctl.id, ctl.value);
|
||||
E_XIOCTL(dev, control->fd, VIDIOC_S_CTRL, &ctl, "Can't set option %s", control->control.name);
|
||||
LOG_INFO(dev, "Configuring option %s (%08x) = %d", control->control.name, ctl.id, ctl.value);
|
||||
ERR_IOCTL(dev, control->fd, VIDIOC_S_CTRL, &ctl, "Can't set option %s", control->control.name);
|
||||
ret = 1;
|
||||
}
|
||||
break;
|
||||
@ -139,15 +139,15 @@ int v4l2_device_set_option(device_t *dev, const char *key, const char *value)
|
||||
}
|
||||
}
|
||||
|
||||
E_LOG_INFO(dev, "Configuring option %s (%08x) = [%d tokens, expected %d]",
|
||||
LOG_INFO(dev, "Configuring option %s (%08x) = [%d tokens, expected %d]",
|
||||
control->control.name, ctl.id, tokens, control->control.elems);
|
||||
E_XIOCTL(dev, control->fd, VIDIOC_S_EXT_CTRLS, &ctrls, "Can't set option %s", control->control.name);
|
||||
ERR_IOCTL(dev, control->fd, VIDIOC_S_EXT_CTRLS, &ctrls, "Can't set option %s", control->control.name);
|
||||
ret = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
E_LOG_ERROR(dev, "The '%s' control type '%d' is not supported", control->control.name, control->control.type);
|
||||
LOG_ERROR(dev, "The '%s' control type '%d' is not supported", control->control.name, control->control.type);
|
||||
}
|
||||
|
||||
error:
|
||||
|
Reference in New Issue
Block a user