summaryrefslogtreecommitdiffstats
path: root/sys/v4l2
diff options
context:
space:
mode:
Diffstat (limited to 'sys/v4l2')
-rw-r--r--sys/v4l2/gstv4l2src.c2
-rw-r--r--sys/v4l2/v4l2-overlay_calls.c8
-rw-r--r--sys/v4l2/v4l2_calls.c40
-rw-r--r--sys/v4l2/v4l2_calls.h10
-rw-r--r--sys/v4l2/v4l2src_calls.c22
5 files changed, 41 insertions, 41 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 697fe421..bde5b503 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -817,7 +817,7 @@ gst_v4l2src_get (GstPad *pad)
if (v4l2src->use_fixed_fps &&
(fps = gst_v4l2src_get_fps(v4l2src)) == 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element"));
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, (NULL), ("could not get frame rate for element"));
return NULL;
}
diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c
index 4e5fb9f0..4d948d0b 100644
--- a/sys/v4l2/v4l2-overlay_calls.c
+++ b/sys/v4l2/v4l2-overlay_calls.c
@@ -60,7 +60,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
switch (system(buff)) {
case -1:
GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
- (_("Could not start v4l-conf")),
+ (_("Could not start v4l-conf.")),
GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
@@ -68,7 +68,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
break;
default:
GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
- (_("Executing v4l-conf failed")),
+ (_("Executing v4l-conf failed.")),
GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
@@ -112,7 +112,7 @@ gst_v4l2_set_window (GstElement *element,
fmt.fmt.win.bitmap = NULL;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FMT, &fmt) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, (NULL),
("Failed to set the video window: %s", g_strerror (errno)));
return FALSE;
}
@@ -138,7 +138,7 @@ gst_v4l2_enable_overlay (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OVERLAY(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_OVERLAY, &doit) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, (NULL),
("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror (errno)));
return FALSE;
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index c206d987..f7c3d3a0 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -55,7 +55,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element)
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Error getting %s capabilities: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -99,7 +99,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in input enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -122,7 +122,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
vtun.index = input.tuner;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER,
&vtun) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get tuner %d settings on %s: %s",
input.tuner,
v4l2element->device,
@@ -161,7 +161,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in output enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -200,7 +200,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in norm enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -237,7 +237,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
else
break;
} else {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in control enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -289,7 +289,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in menu enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
@@ -410,7 +410,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
v4l2element->video_fd = open(v4l2element->device, O_RDWR);
if (!GST_V4L2_IS_OPEN(v4l2element)) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, OPEN_READ_WRITE,
- (_("Could not open device \"%s\" for reading and writing"), v4l2element->device),
+ (_("Could not open device \"%s\" for reading and writing."), v4l2element->device),
GST_ERROR_SYSTEM);
goto error;
}
@@ -424,7 +424,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
if (GST_IS_V4L2SRC(v4l2element) &&
!(v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, NOT_FOUND,
- (_("Device \"%s\" is not a capture device"), v4l2element->device),
+ (_("Device \"%s\" is not a capture device."), v4l2element->device),
("Capabilities: 0x%x", v4l2element->vcap.capabilities));
goto error;
}
@@ -492,7 +492,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get the current norm for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -517,7 +517,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set norm 0x%llx for device %s: %s",
norm, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -543,7 +543,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current input on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -570,7 +570,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set input %d on device %s: %s",
input, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -596,7 +596,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current output on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -623,7 +623,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set output %d on device %s: %s",
output, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -651,7 +651,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
freq.tuner = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current tuner frequency for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -686,7 +686,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
freq.frequency = frequency;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set tuner frequency to %lu for device %s: %s",
frequency, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -714,7 +714,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
tuner.index = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get signal strength for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -746,7 +746,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
control.id = attribute_num;
if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get value for control %d on device %s: %s",
attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE;
@@ -779,7 +779,7 @@ gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
control.value = value;
if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) {
- GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""),
+ GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set value %d for control %d on device %s: %s",
value, attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE;
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index fecfa93f..428c57aa 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -40,7 +40,7 @@
if (!GST_V4L2_IS_OPEN(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- (_("Device is not open")), NULL); \
+ (_("Device is not open.")), (NULL)); \
return FALSE; \
}
@@ -49,7 +49,7 @@
if (GST_V4L2_IS_OPEN(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- (_("Device is open")), NULL); \
+ (_("Device is open.")), (NULL)); \
return FALSE; \
}
@@ -58,7 +58,7 @@
if (!GST_V4L2_IS_OVERLAY(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- NULL, ("Device cannot handle overlay")); \
+ (NULL), ("Device cannot handle overlay")); \
return FALSE; \
}
@@ -67,7 +67,7 @@
if (!GST_V4L2_IS_ACTIVE(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
- NULL, ("Device is not in streaming mode")); \
+ (NULL), ("Device is not in streaming mode")); \
return FALSE; \
}
@@ -76,7 +76,7 @@
if (GST_V4L2_IS_ACTIVE(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
- NULL, ("Device is in streaming mode")); \
+ (NULL), ("Device is in streaming mode")); \
return FALSE; \
}
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index 082e000f..2c644fb7 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -72,7 +72,7 @@ gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src)
if (errno == EINVAL) {
break; /* end of enumeration */
} else {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, (NULL),
("failed to get number %d in pixelformat enumeration for %s: %s",
n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
g_free (format);
@@ -118,7 +118,7 @@ gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->pool->buffers[i].buffer) < 0) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, WRITE,
- (_("Could not write to device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
+ (_("Could not write to device \"%s\"."), GST_V4L2ELEMENT(v4l2src)->device),
("Error queueing buffer %u on device %s", i, g_strerror(errno)));
return FALSE;
}
@@ -142,7 +142,7 @@ gst_v4l2src_grab_frame (GstV4l2Src *v4l2src)
while (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &buffer) < 0) {
/* if the sync() got interrupted, we can retry */
if (errno != EINTR) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, SYNC, NULL, ("could not sync on a buffer on device %s: %s",
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SYNC, (NULL), ("could not sync on a buffer on device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return -1;
}
@@ -170,7 +170,7 @@ gst_v4l2src_get_capture (GstV4l2Src *v4l2src)
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, (NULL),
("failed to get pixelformat for device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;
@@ -206,7 +206,7 @@ gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_S_FMT, &v4l2src->format) < 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, (NULL),
("failed to set pixelformat to %s @ %dx%d for device %s: %s",
fmt->description, width, height, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;
@@ -246,14 +246,14 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
v4l2src->breq.memory = V4L2_MEMORY_MMAP;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
- (_("Could not get buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
+ (_("Could not get buffers from device \"%s\"."), GST_V4L2ELEMENT(v4l2src)->device),
("error requesting %d buffers: %s", v4l2src->breq.count, g_strerror (errno)));
return FALSE;
}
if (v4l2src->breq.count < GST_V4L2_MIN_BUFFERS) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
- (_("Could not get enough buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device),
+ (_("Could not get enough buffers from device \"%s\"."), GST_V4L2ELEMENT(v4l2src)->device),
("we received %d, we want at least %d", v4l2src->breq.count, GST_V4L2_MIN_BUFFERS));
v4l2src->breq.count = buffers;
return FALSE;
@@ -280,7 +280,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
buffer->buffer.index = n;
buffer->buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QUERYBUF, &buffer->buffer) < 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, (NULL),
("Could not get buffer properties of buffer %d: %s", n, g_strerror (errno)));
gst_v4l2src_capture_deinit(v4l2src);
return FALSE;
@@ -288,7 +288,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
buffer->start = mmap (0, buffer->buffer.length, PROT_READ|PROT_WRITE, MAP_SHARED,
GST_V4L2ELEMENT(v4l2src)->video_fd, buffer->buffer.m.offset);
if (buffer->start == MAP_FAILED) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, (NULL),
("Could not mmap video buffer %d: %s", n, g_strerror (errno)));
buffer->start = 0;
gst_v4l2src_capture_deinit (v4l2src);
@@ -328,7 +328,7 @@ gst_v4l2src_capture_start (GstV4l2Src *v4l2src)
v4l2src->quit = FALSE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &type) < 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, OPEN_READ, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, OPEN_READ, (NULL),
("Error starting streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno)));
return FALSE;
@@ -356,7 +356,7 @@ gst_v4l2src_capture_stop (GstV4l2Src *v4l2src)
/* we actually need to sync on all queued buffers but not
* on the non-queued ones */
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &type) < 0) {
- GST_ELEMENT_ERROR (v4l2src, RESOURCE, CLOSE, NULL,
+ GST_ELEMENT_ERROR (v4l2src, RESOURCE, CLOSE, (NULL),
("Error stopping streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE;