How to use GstVideoAffineTransformationMeta in gstglimagesink
Grégoire Gentil
gregoire at gentil.com
Sun May 15 23:57:36 UTC 2016
Hello,
I'm interested to use GstVideoAffineTransformationMeta in
gstglimagesink, especially in gst_glimage_sink_on_draw:
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/gl/gstglimagesink.c#n2028
I have a pad probe installed in my pipeline in which I do:
static GstPadProbeReturn cb_have_data(GstPad *pad, GstPadProbeInfo
*info, CustomData *data) {
GstBuffer *buffer = gst_pad_probe_info_get_buffer (info);
GstVideoAffineTransformationMeta *meta =
gst_buffer_add_video_affine_transformation_meta (buffer);
//To be modified
const gfloat matrix[16] = {
0.1f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
};
gst_video_affine_transformation_meta_apply_matrix (meta, matrix);
But when the code reaches gst_glimage_sink_on_draw, af_meta =
gst_buffer_get_video_affine_transformation_meta
(gl_sink->stored_buffer[0]); is NULL.
Any idea how I could use GstVideoAffineTransformationMeta to have my own
transform matrix?
Thanks in advance,
Grégoire
More information about the gstreamer-devel
mailing list