After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729861 - glfilter: lose some caps informations like the framerate
glfilter: lose some caps informations like the framerate
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-09 10:48 UTC by Julien Isorce
Modified: 2014-05-25 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glfilter: rewrite transform_caps to preserve caps fields (2.98 KB, patch)
2014-05-13 14:10 UTC, Julien Isorce
committed Details | Review
Remove format information to allow color convertion (2.93 KB, patch)
2014-05-25 13:05 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Julien Isorce 2014-05-09 10:48:59 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 )
Comment 1 Julien Isorce 2014-05-13 14:10:11 UTC
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.
Comment 2 Nicolas Dufresne (ndufresne) 2014-05-13 16:27:38 UTC
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 3 Nicolas Dufresne (ndufresne) 2014-05-13 16:47:11 UTC
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
Comment 4 Matthew Waters (ystreet00) 2014-05-23 00:14:48 UTC
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
Comment 5 Nicolas Dufresne (ndufresne) 2014-05-25 13:05:14 UTC
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.
Comment 6 Matthew Waters (ystreet00) 2014-05-25 13:16:08 UTC
Review of attachment 277144 [details] [review]:

Looks good
Comment 7 Nicolas Dufresne (ndufresne) 2014-05-25 13:24:06 UTC
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