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 761747 - Client-draw problem in glimagesink (Android)
Client-draw problem in glimagesink (Android)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-09 06:48 UTC by Gregoire
Modified: 2016-02-10 07:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gregoire 2016-02-09 06:48:47 UTC
First, documentation in the source code is not correct here:

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/gl/gstglimagesink.c#n538

The arguments are context and sample.


Secondly, it seems that GstVideoAffineTransformationMeta is always NULL. In an Android 6.0.1 Gstreamer-master-git tutorial-5-derived application, I have:


g_signal_connect(G_OBJECT(data->glimagesink), "client-draw", G_CALLBACK(client_draw_cb), data);


static gboolean client_draw_cb(GstElement *sink, GLuint texture, GstSample *sample, CustomData *data) {

GstBuffer *buf = gst_sample_get_buffer(sample);
GstVideoAffineTransformationMeta *atm = gst_buffer_get_video_affine_transformation_meta(buf);
//atm is NULL all the time
atm = gst_buffer_add_video_affine_transformation_meta(buf);
//atm is NULL again

GstVideoAffineTransformationMeta is null and it can't be created.


To give the big picture, my objective is to crop the video. I tried glOrthof but as I return FALSE because I don't want to deal with the texture, it's discarded by the original code. Fair enough. So I wanted to use a GstVideoAffineTransformationMeta. I can't access or create any GstVideoAffineTransformationMeta in this callback.
Comment 1 Gregoire 2016-02-09 08:34:47 UTC
It seems that the buffer is not writable (gst_buffer_is_writable(element) == 0). I guess that it's by design.

Still the documentation about the client-redraw callback is not proper.
Comment 2 Gregoire 2016-02-10 07:52:09 UTC
GstVideoAffineTransformationMeta should be added in the probe of glimagesink, not in the client-draw. That was my problem. Sorry for the noise.