From 97a46ffce6855985e48236e90a1a6dec53a8c527 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Sat, 2 Sep 2006 14:28:55 +0000 Subject: 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 --- sys/v4l2/gstv4l2.c | 6 +++--- sys/v4l2/gstv4l2colorbalance.c | 5 +++-- sys/v4l2/gstv4l2colorbalance.h | 5 +++-- sys/v4l2/gstv4l2object.c | 8 +++++--- sys/v4l2/gstv4l2object.h | 6 +++--- sys/v4l2/gstv4l2src.c | 6 +++--- sys/v4l2/gstv4l2src.h | 6 +++--- sys/v4l2/gstv4l2tuner.c | 5 +++-- sys/v4l2/gstv4l2tuner.h | 5 +++-- sys/v4l2/gstv4l2xoverlay.c | 9 +++++---- sys/v4l2/gstv4l2xoverlay.h | 5 +++-- sys/v4l2/v4l2_calls.c | 17 ++++++++++------- sys/v4l2/v4l2_calls.h | 7 +++++-- sys/v4l2/v4l2src_calls.c | 15 +++++++++------ sys/v4l2/v4l2src_calls.h | 7 +++++-- 15 files changed, 66 insertions(+), 46 deletions(-) (limited to 'sys') diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c index 0e7474e7..db205e67 100644 --- a/sys/v4l2/gstv4l2.c +++ b/sys/v4l2/gstv4l2.c @@ -1,9 +1,9 @@ /* GStreamer - * - * gstv4l2.c: plugin for v4l2 elements * * Copyright (C) 2001-2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/gstv4l2colorbalance.c b/sys/v4l2/gstv4l2colorbalance.c index d8bfd35e..26c68f49 100644 --- a/sys/v4l2/gstv4l2colorbalance.c +++ b/sys/v4l2/gstv4l2colorbalance.c @@ -1,6 +1,7 @@ -/* GStreamer Color Balance interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * gstv4l2colorbalance.c: color balance interface implementation for V4L2 * diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h index 761360fa..193c6a4a 100644 --- a/sys/v4l2/gstv4l2colorbalance.h +++ b/sys/v4l2/gstv4l2colorbalance.h @@ -1,6 +1,7 @@ -/* G-Streamer generic V4L2 element - Color Balance interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * gstv4l2colorbalance.h: color balance interface implementation for V4L2 * diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 148ca399..ee4027ca 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -1,7 +1,9 @@ -/* - * GStreamer gstv4l2object.c: base class for V4L2 elements +/* GStreamer + * * Copyright (C) 2001-2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h index 599a7289..54d799d4 100644 --- a/sys/v4l2/gstv4l2object.h +++ b/sys/v4l2/gstv4l2object.h @@ -1,9 +1,9 @@ /* GStreamer - * - * gstv4l2object.h: base class for V4L2 elements * * Copyright (C) 2001-2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index ff83b0fa..17b679a3 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -1,9 +1,9 @@ /* GStreamer - * - * gstv4l2src.c: BT8x8/V4L2 source element * * Copyright (C) 2001-2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h index c20ee22c..af6de21e 100644 --- a/sys/v4l2/gstv4l2src.h +++ b/sys/v4l2/gstv4l2src.h @@ -1,9 +1,9 @@ /* GStreamer - * - * gstv4l2src.h: BT8x8/V4L2 video source element * * Copyright (C) 2001-2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/gstv4l2tuner.c b/sys/v4l2/gstv4l2tuner.c index d0a9a1f4..3ec73a23 100644 --- a/sys/v4l2/gstv4l2tuner.c +++ b/sys/v4l2/gstv4l2tuner.c @@ -1,6 +1,7 @@ -/* GStreamer Tuner interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * gstv4l2tuner.c: tuner interface implementation for V4L2 * diff --git a/sys/v4l2/gstv4l2tuner.h b/sys/v4l2/gstv4l2tuner.h index 523eea35..1021b08c 100644 --- a/sys/v4l2/gstv4l2tuner.h +++ b/sys/v4l2/gstv4l2tuner.h @@ -1,6 +1,7 @@ -/* G-Streamer generic V4L2 element - Tuner interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * gstv4l2tuner.h: tuner interface implementation for V4L2 * diff --git a/sys/v4l2/gstv4l2xoverlay.c b/sys/v4l2/gstv4l2xoverlay.c index 402e6ef1..be50ba34 100644 --- a/sys/v4l2/gstv4l2xoverlay.c +++ b/sys/v4l2/gstv4l2xoverlay.c @@ -1,6 +1,7 @@ -/* GStreamer X-based overlay interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * 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; } diff --git a/sys/v4l2/gstv4l2xoverlay.h b/sys/v4l2/gstv4l2xoverlay.h index d8add592..e832d19d 100644 --- a/sys/v4l2/gstv4l2xoverlay.h +++ b/sys/v4l2/gstv4l2xoverlay.h @@ -1,6 +1,7 @@ -/* G-Streamer generic V4L2 element - X overlay interface implementation +/* GStreamer + * * Copyright (C) 2003 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima * * gstv4l2xoverlay.h: tv mixer interface implementation for V4L2 * diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index c74e5be0..c9193697 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -1,6 +1,9 @@ -/* G-Streamer generic V4L2 element - generic V4L2 calls handling +/* GStreamer + * * Copyright (C) 2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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; } diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h index 36075c6f..f9f9ed20 100644 --- a/sys/v4l2/v4l2_calls.h +++ b/sys/v4l2/v4l2_calls.h @@ -1,6 +1,9 @@ -/* G-Streamer generic V4L2 element - generic V4L2 calls handling +/* GStreamer + * * Copyright (C) 2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index 3cfd0b08..9e9724dd 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -1,6 +1,9 @@ -/* G-Streamer Video4linux2 video-capture plugin - system calls +/* GStreamer + * * Copyright (C) 2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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)); diff --git a/sys/v4l2/v4l2src_calls.h b/sys/v4l2/v4l2src_calls.h index 6cb637b3..437c45f5 100644 --- a/sys/v4l2/v4l2src_calls.h +++ b/sys/v4l2/v4l2src_calls.h @@ -1,6 +1,9 @@ -/* G-Streamer Video4linux2 video-capture plugin - system calls +/* GStreamer + * * Copyright (C) 2002 Ronald Bultje - * Copyright (C) 2006 Edgard Lima + * 2006 Edgard Lima + * + * 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 -- cgit v1.2.1