sys/v4l2/: Cleanup error messages and unify header comments

Original commit message from CVS:
* sys/v4l2/gstv4l2.c:
* sys/v4l2/gstv4l2colorbalance.c:
* sys/v4l2/gstv4l2colorbalance.h:
* sys/v4l2/gstv4l2object.c:
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c:
* sys/v4l2/gstv4l2src.h:
* sys/v4l2/gstv4l2tuner.c:
* sys/v4l2/gstv4l2tuner.h:
* sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_open):
* sys/v4l2/gstv4l2xoverlay.h:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_open):
* sys/v4l2/v4l2_calls.h:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_queue_frame),
(gst_v4l2src_capture_init):
* sys/v4l2/v4l2src_calls.h:
Cleanup error messages and unify header comments
This commit is contained in:
Stefan Kost 2006-09-02 14:28:55 +00:00
parent b1d7198d6e
commit 074e7b0d53
15 changed files with 66 additions and 46 deletions

View file

@ -1,9 +1,9 @@
/* GStreamer
*
* gstv4l2.c: plugin for v4l2 elements
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2.c: plugin for v4l2 elements
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -1,6 +1,7 @@
/* GStreamer Color Balance interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2colorbalance.c: color balance interface implementation for V4L2
*

View file

@ -1,6 +1,7 @@
/* G-Streamer generic V4L2 element - Color Balance interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2colorbalance.h: color balance interface implementation for V4L2
*

View file

@ -1,7 +1,9 @@
/*
* GStreamer gstv4l2object.c: base class for V4L2 elements
/* GStreamer
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2object.c: base class for V4L2 elements
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published

View file

@ -1,9 +1,9 @@
/* GStreamer
*
* gstv4l2object.h: base class for V4L2 elements
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2object.h: base class for V4L2 elements
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -1,9 +1,9 @@
/* GStreamer
*
* gstv4l2src.c: BT8x8/V4L2 source element
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2src.c: BT8x8/V4L2 source element
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -1,9 +1,9 @@
/* GStreamer
*
* gstv4l2src.h: BT8x8/V4L2 video source element
*
* Copyright (C) 2001-2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2src.h: BT8x8/V4L2 source element
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -1,6 +1,7 @@
/* GStreamer Tuner interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2tuner.c: tuner interface implementation for V4L2
*

View file

@ -1,6 +1,7 @@
/* G-Streamer generic V4L2 element - Tuner interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2tuner.h: tuner interface implementation for V4L2
*

View file

@ -1,6 +1,7 @@
/* GStreamer X-based overlay interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2xoverlay.c: X-based overlay interface implementation for V4L2
*
@ -98,8 +99,8 @@ gst_v4l2_xoverlay_open (GstV4l2Object * v4l2object)
}
if (fstat (v4l2object->video_fd, &s) < 0) {
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, NOT_FOUND,
(_("Cannot identify '%s': %d, %s\n"), v4l2object->videodev, errno,
strerror (errno)), (NULL));
(_("Cannot identify device '%s': %s\n"), v4l2object->videodev,
g_strerror (errno)), GST_ERROR_SYSTEM);
XCloseDisplay (dpy);
return;
}

View file

@ -1,6 +1,7 @@
/* G-Streamer generic V4L2 element - X overlay interface implementation
/* GStreamer
*
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2xoverlay.h: tv mixer interface implementation for V4L2
*

View file

@ -1,6 +1,9 @@
/* G-Streamer generic V4L2 element - generic V4L2 calls handling
/* GStreamer
*
* Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* v4l2_calls.c - generic V4L2 calls handling
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -55,7 +58,7 @@ gst_v4l2_get_capabilities (GstV4l2Object * v4l2object)
if (ioctl (v4l2object->video_fd, VIDIOC_QUERYCAP, &(v4l2object->vcap)) < 0) {
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
(_("Error getting capabilities '%s': %d, %s. It isn't a v4l2 driver. Check if it is a v4l1 driver\n"), v4l2object->videodev, errno, strerror (errno)), GST_ERROR_SYSTEM);
(_("Error getting capabilities for device '%s': %s. It isn't a v4l2 driver. Check if it is a v4l1 driver\n"), v4l2object->videodev, g_strerror (errno)), GST_ERROR_SYSTEM);
return FALSE;
}
@ -365,14 +368,14 @@ gst_v4l2_open (GstV4l2Object * v4l2object)
/* check if it is a device */
if (-1 == stat (v4l2object->videodev, &st)) {
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, NOT_FOUND,
(_("Cannot identify '%s': %d, %s\n"),
v4l2object->videodev, errno, strerror (errno)), GST_ERROR_SYSTEM);
(_("Cannot identify device '%s': %s\n"), v4l2object->videodev,
g_strerror (errno)), GST_ERROR_SYSTEM);
goto error;
}
if (!S_ISCHR (st.st_mode)) {
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, NOT_FOUND,
(_("It isn't a device '%s': %d, %s\n"),
v4l2object->videodev, errno, strerror (errno)), GST_ERROR_SYSTEM);
(_("This isn't a device '%s': %s\n"), v4l2object->videodev,
g_strerror (errno)), GST_ERROR_SYSTEM);
goto error;
}

View file

@ -1,6 +1,9 @@
/* G-Streamer generic V4L2 element - generic V4L2 calls handling
/* GStreamer
*
* Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* v4l2_calls.h - generic V4L2 calls handling
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View file

@ -1,6 +1,9 @@
/* G-Streamer Video4linux2 video-capture plugin - system calls
/* GStreamer
*
* Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* v4l2src.c - system calls
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -124,7 +127,7 @@ gst_v4l2src_queue_frame (GstV4l2Src * v4l2src, guint i)
if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_QBUF,
&v4l2src->pool->buffers[i].buffer) < 0) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, WRITE,
(_("Could not write to device \"%s\"."),
(_("Could not write to device '%s'."),
v4l2src->v4l2object->videodev),
("Error queueing buffer %u on device %s", i, g_strerror (errno)));
return FALSE;
@ -352,7 +355,7 @@ gst_v4l2src_capture_init (GstV4l2Src * v4l2src)
if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_REQBUFS,
&v4l2src->breq) < 0) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
(_("Could not get buffers from device \"%s\"."),
(_("Could not get buffers from device '%s'."),
v4l2src->v4l2object->videodev),
("error requesting %d buffers: %s",
v4l2src->breq.count, g_strerror (errno)));
@ -364,7 +367,7 @@ gst_v4l2src_capture_init (GstV4l2Src * v4l2src)
GST_INFO_OBJECT (v4l2src, "using fallback read method");
} else {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
(_("the driver of device \"%s\" is broken."),
(_("the driver of device '%s' is broken."),
v4l2src->v4l2object->videodev),
("no supported read capability from %s",
v4l2src->v4l2object->videodev));
@ -381,7 +384,7 @@ gst_v4l2src_capture_init (GstV4l2Src * v4l2src)
if (v4l2src->breq.memory > 0) {
if (v4l2src->breq.count < GST_V4L2_MIN_BUFFERS) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ,
(_("Could not get enough buffers from device \"%s\"."),
(_("Could not get enough buffers from device '%s'."),
v4l2src->v4l2object->videodev),
("we received %d, we want at least %d",
v4l2src->breq.count, GST_V4L2_MIN_BUFFERS));

View file

@ -1,6 +1,9 @@
/* G-Streamer Video4linux2 video-capture plugin - system calls
/* GStreamer
*
* Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* v4l2src.h - system calls
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public