GNOME Bugzilla – Bug 648312
[v4l2sink] Unconditionally accepts video/mpegts
Last modified: 2011-06-15 22:43:33 UTC
When v4l2sink is raised to a non-null rank (because system has a v4l2 output device) and when playbin2 plays back a mpeg-ts file, it ends up auto-plugging the mpeg-ts stream directly to v4l2sink. This is because v4l2sink unconditionally accepts video/mpegts and doesn't check whether the hardware can actually support it. The culprit seems to be in gstv4l2object: @@ -1842,6 +1863,9 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object, guint32 pixelformat, memset (&format, 0x00, sizeof (struct v4l2_format)); format.type = v4l2object->type; + if (pixelformat == GST_MAKE_FOURCC ('M', 'P', 'E', 'G')) + return TRUE; + if (v4l2_ioctl (fd, VIDIOC_G_FMT, &format) < 0) goto get_fmt_failed;
What should be set for mpegts in width/height/field? Did you check if it works if you just put 0 in there, that return TRUE there is definitely wrong.
Created attachment 186818 [details] [review] v4l2objects: Only allow mpeg-ts on source objects Ugly fix for #648312
Comment on attachment 186818 [details] [review] v4l2objects: Only allow mpeg-ts on source objects (((Works)&&(for)&&(me))&&(thanks)
commit 1a310d558c6c123f73593009200589f252d2d949 Author: Edward Hervey <edward.hervey@collabora.co.uk> Date: Thu Apr 28 15:57:04 2011 +0200 v4l2objects: Only allow mpeg-ts on source objects Ugly fix for #648312