if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Error getting %s capabilities: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in pixelformat enumeration for %s: %s",
- n, v4l2element->device, strerror(errno));
+ n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in input enumeration for %s: %s",
- n, v4l2element->device, strerror(errno));
+ n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in output enumeration for %s: %s",
- n, v4l2element->device, strerror(errno));
+ n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in norm enumeration for %s: %s",
- n, v4l2element->device, strerror(errno));
+ n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in control enumeration for %s: %s",
- n, v4l2element->device, strerror(errno));
+ n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
else {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get no. %d in menu %d enumeration for %s: %s",
- i, n, v4l2element->device, strerror(errno));
+ i, n, v4l2element->device, g_strerror(errno));
return FALSE;
}
}
if (!GST_V4L2_IS_OPEN(v4l2element)) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to open device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
goto error;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, &standard) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get the current norm for device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &standard->std) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set norm '%s' (%d) for device %s: %s",
- standard->std.name, norm, v4l2element->device, strerror(errno));
+ standard->std.name, norm, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get current input on device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set input %d on device %s: %s",
- input, v4l2element->device, strerror(errno));
+ input, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get current output on device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set output %d on device %s: %s",
- output, v4l2element->device, strerror(errno));
+ output, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQ, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get current tuner frequency for device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQ, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set tuner frequency to %lu for device %s: %s",
- frequency, v4l2element->device, strerror(errno));
+ frequency, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set signal strength for device %s: %s",
- v4l2element->device, strerror(errno));
+ v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to get value for control %d on device %s: %s",
- attribute_num, v4l2element->device, strerror(errno));
+ attribute_num, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) {
gst_element_error(GST_ELEMENT(v4l2element),
"Failed to set value %d for control %d on device %s: %s",
- value, attribute_num, v4l2element->device, strerror(errno));
+ value, attribute_num, v4l2element->device, g_strerror(errno));
return FALSE;
}
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->bufsettings) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error queueing buffer %d on device %s: %s",
- num, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ num, GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &v4l2src->bufsettings) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error syncing on a buffer on device %s: %s",
- GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
DEBUG("synced on frame %d", v4l2src->bufsettings.index);
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Failed to get pixel format for device %s: %s",
- GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
gst_element_error(GST_ELEMENT(v4l2src),
"Failed to set pixel format to %s @ %dx%d for device %s: %s",
fmt->description, width, height,
- GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error requesting buffers (%d) for %s: %s",
- v4l2src->breq.count, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ v4l2src->breq.count, GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
if (GST_V4L2ELEMENT(v4l2src)->buffer[n] == MAP_FAILED) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error mapping video buffer %d on device %s: %s",
- n, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
GST_V4L2ELEMENT(v4l2src)->buffer[n] = NULL;
return FALSE;
}
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error starting streaming capture for %s: %s",
- GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &n) < 0) {
gst_element_error(GST_ELEMENT(v4l2src),
"Error stopping streaming capture for %s: %s",
- GST_V4L2ELEMENT(v4l2src)->device, strerror(errno));
+ GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno));
return FALSE;
}