[Bug 725860] v4l2src: Fix using v4l2src with Hauppauge HDPVR video capture device

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Apr 1 08:45:48 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=725860
  GStreamer | gst-plugins-good | 1.2.3

--- Comment #25 from Will Manley <gnome at williammanley.net> 2014-04-01 15:45:44 UTC ---
Ah, 09dabd4 seems interesting:


commit 09dabd4be60c1f0a2e3132a23abcfa97d544b800
Author: Youness Alaoui <youness.alaoui at collabora.co.uk>
Date:   Thu Apr 19 08:27:01 2012 +0000

    v4l2src: Allow mpeg-ts cameras to negociate format

    This removes an ugly hack until the reason for the hack can be documented

diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 74d1e83..92df04f 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -2235,10 +2235,16 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object,
GstCaps * caps)
   GST_V4L2_CHECK_OPEN (v4l2object);
   GST_V4L2_CHECK_NOT_ACTIVE (v4l2object);

+  /* MPEG-TS source cameras don't get their format set for some reason.
+   * It looks wrong and we weren't able to track down the reason for that code
+   * so it is disabled until someone who has an mpeg-ts camera complains...
+   */
+#if 0
   /* Only unconditionally accept mpegts for sources */
   if ((v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) &&
       (pixelformat == GST_MAKE_FOURCC ('M', 'P', 'E', 'G')))
     goto done;
+#endif

   memset (&format, 0x00, sizeof (struct v4l2_format));
   format.type = v4l2object->type;
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index fa9a55c..1104d70 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -215,8 +215,14 @@ gst_v4l2src_set_capture (GstV4l2Src * v4l2src, guint32
pixelformat,
   gint fd = v4l2src->v4l2object->video_fd;
   struct v4l2_streamparm stream;

+  /* MPEG-TS source cameras don't get their format set for some reason.
+   * It looks wrong and we weren't able to track down the reason for that code
+   * so it is disabled until someone who has an mpeg-ts camera complains...
+   */
+#if 0
   if (pixelformat == GST_MAKE_FOURCC ('M', 'P', 'E', 'G'))
     return TRUE;
+#endif

   g_signal_emit_by_name (v4l2src, "prepare-format",
       v4l2src->v4l2object->video_fd, pixelformat, width, height);

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list