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 756245 - glshader: Add GRAY8 support
glshader: Add GRAY8 support
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-08 13:55 UTC by Hamdi Rakkez
Modified: 2018-11-03 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hamdi Rakkez 2015-10-08 13:55:07 UTC
glshader can take as an input only RGBA format.
Adding GRAY8 format as an input will be very important for this element.
Comment 1 Sebastian Dröge (slomo) 2015-10-08 14:12:20 UTC
Do you want to provide a patch?
Comment 2 Hamdi Rakkez 2015-10-08 14:20:28 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> Do you want to provide a patch?

I've tried to make glshader support GRAY8 but I couldn't.
I hope to get get some clarification about where to start to do this.

From where do this element get the information about it's capabilities (RGBA) ?
Comment 3 Matthew Waters (ystreet00) 2015-10-09 07:45:29 UTC
(In reply to Hamdi Rakkez from comment #2)
> (In reply to Sebastian Dröge (slomo) from comment #1)
> From where do this element get the information about it's capabilities
> (RGBA) ?

From its parent class, GstGLFilter.
Comment 4 Hamdi Rakkez 2015-11-11 11:31:57 UTC
Adding GRAY8 to GstGLFilter class in GstStaticPadTemplate gst_gl_filter_sink_pad_template does not solve the problem.

Still other modifications are required.
Comment 5 Hamdi Rakkez 2015-11-11 11:32:22 UTC
Adding GRAY8 to GstGLFilter class in GstStaticPadTemplate gst_gl_filter_sink_pad_template does not solve the problem.

Still other modifications are required.
Comment 6 Matthew Waters (ystreet00) 2015-11-11 11:42:11 UTC
You have to select it somehow with a capsfilter or override the fixate_caps virtual method in your element to select GRAY8 instead of RGBA.
Comment 7 Hamdi Rakkez 2015-11-11 12:15:39 UTC
I have used a capsfilter to override caps like this :

gst-launch-1.0 videotestsrc ! video/x-raw,format=GRAY8,width=800,height=600 ! imagefreeze ! glupload ! capsfilter caps="video/x-raw(memory:GLMemory),format=GRAY8,width=800,height=600" ! glshader location=my_shader.frag ! glimagesink

But I have a link error :

ERROR           GST_PIPELINE grammar.y:617:gst_parse_perform_link: could not link capsfilter0 to glfiltershader0
Comment 8 Matthew Waters (ystreet00) 2015-11-11 12:23:41 UTC
That generally means you didn't do the modification correctly.  Does gst-inspect-1.0 glshader
show the GRAY8 caps?

Try running with GST_DEBUG=base*:7 to see what caps are being tried.
Comment 9 Hamdi Rakkez 2015-11-11 12:54:25 UTC
No in fact, I have done correctly the modification in GstGLFilter

So, gst-inspect-1.0 glshader gives :

...

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:GLMemory)
                 format: { RGBA, GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:GLMemory)
                 format: { RGBA, GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

...
Comment 10 GStreamer system administrator 2018-11-03 11:42:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/230.