From: <wt...@ke...> - 2008-08-21 12:12:03
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: wtay Date: Thu Aug 21 2008 12:12:14 UTC Log message: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure), (gst_v4l2_get_caps_info): Add S910 and PWC formats with a low priority. * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank), (gst_v4l2src_probe_caps_for_format): Add more debugging. Modified files: . : ChangeLog sys/v4l2 : gstv4l2src.c v4l2src_calls.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3690&r2=1.3691 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/sys/v4l2/gstv4l2src.c.diff?r1=1.98&r2=1.99 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/sys/v4l2/v4l2src_calls.c.diff?r1=1.87&r2=1.88 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.3690 retrieving revision 1.3691 diff -u -d -r1.3690 -r1.3691 --- ChangeLog 20 Aug 2008 21:54:33 -0000 1.3690 +++ ChangeLog 21 Aug 2008 12:11:58 -0000 1.3691 @@ -1,3 +1,13 @@ +2008-08-21 Wim Taymans <wim...@co...> + + * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure), + (gst_v4l2_get_caps_info): + Add S910 and PWC formats with a low priority. + * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_format_get_rank), + (gst_v4l2src_probe_caps_for_format): + Add more debugging. 2008-08-20 Tim-Philipp Müller <tim at collabora co uk> * ext/flac/gstflacenc.c: Index: gstv4l2src.c RCS file: /cvs/gstreamer/gst-plugins-good/sys/v4l2/gstv4l2src.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- gstv4l2src.c 13 Aug 2008 08:33:57 -0000 1.98 +++ gstv4l2src.c 21 Aug 2008 12:12:00 -0000 1.99 @@ -581,15 +581,6 @@ { GstStructure *structure = NULL; - /* FIXME: new FourCCs - camera: ZC0301 PC Camera - driver: zc0301 - BA81, S910, PWC1, PWC2 - - camera: - driver: - */ switch (fourcc) { case V4L2_PIX_FMT_MJPEG: /* Motion-JPEG */ case V4L2_PIX_FMT_JPEG: /* JFIF JPEG */ @@ -748,9 +739,26 @@ break; case V4L2_PIX_FMT_WNVA: /* Winnov hw compres */ +#ifdef V4L2_PIX_FMT_SBGGR8 case V4L2_PIX_FMT_SBGGR8: structure = gst_structure_new ("video/x-raw-bayer", NULL); +#endif +#ifdef V4L2_PIX_FMT_SN9C10X + case V4L2_PIX_FMT_SN9C10X: + structure = gst_structure_new ("video/x-sonix", NULL); + break; +#ifdef V4L2_PIX_FMT_PWC1 + case V4L2_PIX_FMT_PWC1: + structure = gst_structure_new ("video/x-pwc1", NULL); +#ifdef V4L2_PIX_FMT_PWC2 + case V4L2_PIX_FMT_PWC2: + structure = gst_structure_new ("video/x-pwc2", NULL); default: GST_DEBUG ("Unknown fourcc 0x%08x %" GST_FOURCC_FORMAT, fourcc, GST_FOURCC_ARGS (fourcc)); @@ -988,8 +996,22 @@ fourcc = V4L2_PIX_FMT_DV; } else if (strcmp (mimetype, "image/jpeg") == 0) { fourcc = V4L2_PIX_FMT_JPEG; } else if (strcmp (mimetype, "video/x-raw-bayer") == 0) { fourcc = V4L2_PIX_FMT_SBGGR8; + } else if (strcmp (mimetype, "video/x-sonix") == 0) { + fourcc = V4L2_PIX_FMT_SN9C10X; + } else if (strcmp (mimetype, "video/x-pwc1") == 0) { + fourcc = V4L2_PIX_FMT_PWC1; + } else if (strcmp (mimetype, "video/x-pwc2") == 0) { + fourcc = V4L2_PIX_FMT_PWC2; } if (fourcc == 0) Index: v4l2src_calls.c RCS file: /cvs/gstreamer/gst-plugins-good/sys/v4l2/v4l2src_calls.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- v4l2src_calls.c 13 Aug 2008 08:33:57 -0000 1.87 +++ v4l2src_calls.c 21 Aug 2008 12:12:00 -0000 1.88 @@ -406,7 +406,9 @@ #define YUV_ODD_BASE_RANK 50 #define RGB_ODD_BASE_RANK 25 #define BAYER_BASE_RANK 15 +#define S910_BASE_RANK 10 #define GREY_BASE_RANK 5 +#define PWC_BASE_RANK 1 static gint gst_v4l2src_format_get_rank (guint32 fourcc) @@ -470,6 +472,14 @@ return BAYER_BASE_RANK; + return S910_BASE_RANK; + return PWC_BASE_RANK; @@ -770,11 +780,16 @@ size.index = 0; size.pixel_format = pixelformat; + GST_DEBUG_OBJECT (v4l2src, "Enumerating frame sizes"); if (ioctl (fd, VIDIOC_ENUM_FRAMESIZES, &size) < 0) goto enum_framesizes_failed; if (size.type == V4L2_FRMSIZE_TYPE_DISCRETE) { do { + GST_LOG_OBJECT (v4l2src, "got discrete frame size %dx%d", + size.discrete.width, size.discrete.height); w = MIN (size.discrete.width, G_MAXINT); h = MIN (size.discrete.height, G_MAXINT); @@ -788,7 +803,16 @@ size.index++; } while (ioctl (fd, VIDIOC_ENUM_FRAMESIZES, &size) >= 0); + GST_DEBUG_OBJECT (v4l2src, "done iterating discrete frame sizes"); } else if (size.type == V4L2_FRMSIZE_TYPE_STEPWISE) { + GST_DEBUG_OBJECT (v4l2src, "we have stepwise frame sizes:"); + GST_DEBUG_OBJECT (v4l2src, "min width: %d", size.stepwise.min_width); + GST_DEBUG_OBJECT (v4l2src, "min height: %d", size.stepwise.min_height); + GST_DEBUG_OBJECT (v4l2src, "max width: %d", size.stepwise.max_width); + GST_DEBUG_OBJECT (v4l2src, "min height: %d", size.stepwise.max_height); + GST_DEBUG_OBJECT (v4l2src, "step width: %d", size.stepwise.step_width); + GST_DEBUG_OBJECT (v4l2src, "step height: %d", size.stepwise.step_height); for (w = size.stepwise.min_width, h = size.stepwise.min_height; w < size.stepwise.max_width && h < size.stepwise.max_height; w += size.stepwise.step_width, h += size.stepwise.step_height) { @@ -803,9 +827,16 @@ if (tmp) results = g_list_prepend (results, tmp); } + GST_DEBUG_OBJECT (v4l2src, "done iterating stepwise frame sizes"); } else if (size.type == V4L2_FRMSIZE_TYPE_CONTINUOUS) { guint32 maxw, maxh; + GST_DEBUG_OBJECT (v4l2src, "we have continuous frame sizes:"); w = MAX (size.stepwise.min_width, 1); h = MAX (size.stepwise.min_height, 1); maxw = MIN (size.stepwise.max_width, G_MAXINT); |