From: Stefan Kost Date: Sat, 2 Sep 2006 14:28:55 +0000 (+0000) Subject: sys/v4l2/: Cleanup error messages and unify header comments X-Git-Tag: 1.19.3~509^2~12486 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=074e7b0d5335d919c65c3aa9e789c1d227fe1507;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c index 0e7474e796..db205e6716 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 d8bfd35eff..26c68f494b 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 761360faf7..193c6a4ac1 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 148ca399fe..ee4027ca14 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 599a728926..54d799d4b8 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 ff83b0faed..17b679a330 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 c20ee22c3b..af6de21ec7 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 d0a9a1f40f..3ec73a23f4 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 523eea35ca..1021b08cb7 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 402e6ef13e..be50ba34ef 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 d8add592d1..e832d19dbd 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 c74e5be0f2..c919369739 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 36075c6f61..f9f9ed200f 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 3cfd0b08aa..9e9724dd16 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 6cb637b327..437c45f52e 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