GNOME Bugzilla – Bug 729861
glfilter: lose some caps informations like the framerate
Last modified: 2014-05-25 13:24:24 UTC
gst-launch-1.0 filesrc location=bbb.mp4 ! qtdemux ! h264parse ! avdec_h264 ! gleffects ! glimagesink gleffects sink caps: video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)24/1 gleffects src caps: video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)640, height=(int)360, framerate=(fraction)0/1 The 0/1 framerate is not really great :) I guess we should keep pixel-aspect-ratio, interlace-mode and colorimetry too by default. (Same remarks when downloading the frame by connection an encoder after a glfilter. i.e. avenc_X sink caps: video/x-raw, format=(string)I420, width=(int)640, height=(int)360, framerate=(fraction)0/1 )
Created attachment 276455 [details] [review] glfilter: rewrite transform_caps to preserve caps fields If direction GST_PAD_SRC then just copy the caps and intersect with filter if exists. If direction GST_PAD_SINK then for each caps replace the feature by ours (+ set RGBA as we currently only support RGBA) and merge with given caps. I have the feeling it's still not really great but at least fields like framerate are preserved.
Review of attachment 276455 [details] [review]: Looks better at first sight. I think you can merge, not setting commit now only because I have no idea how to test it. Any recommendation ?
Comment on attachment 276455 [details] [review] glfilter: rewrite transform_caps to preserve caps fields Actually read the initial comment and tested. Much better indeed. commit e46de48f104e6a48680d992b9425826b7c3f05f7 Author: Julien Isorce <julien.isorce@collabora.co.uk> Date: Tue May 13 13:30:47 2014 +0100 glfilter: rewrite transform_caps to preserve caps fields https://bugzilla.gnome.org/show_bug.cgi?id=729861
Ok, so this breaks the pipeline where the formats are different on each side of the filter, ie: video/x-raw,format=I420 ! glfilter ! video/x-raw,format=RGBA
Created attachment 277144 [details] [review] Remove format information to allow color convertion This should do, not that I notice from there that some convertion path are broken.
Review of attachment 277144 [details] [review]: Looks good
Comment on attachment 277144 [details] [review] Remove format information to allow color convertion commit 075701669e90d1d4ffb75a214a1a718c8f1326a4 Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> Date: Sun May 25 09:03:32 2014 -0400 glfilter: Remove format information to allow color convert again We also need to remove the format information, as glfilter can do color convertion. This code was imported from videoconvert. https://bugzilla.gnome.org/show_bug.cgi?id=729861