[Bug 765795] glimagesink: support video frame rotation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri May 13 11:37:02 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765795

--- Comment #17 from Haihua Hu <jared.hu at nxp.com> ---
(In reply to Matthew Waters (ystreet00) from comment #16)
> Review of attachment 327550 [details] [review]:
> 
> .
> 
> ::: ext/gl/gstglimagesink.c
> @@ +2290,3 @@
> +        (gl_sink->stored_buffer[0]);
> +    if (af_meta)
> +      gl_sink->transform_matrix = af_meta->matrix;
> 
> What if there's a transformation meta and the rotate property is set to
> !identity?  We need to combine the two transformations.

Yes, the result should be the multiple of these two transformations.

> 
> ::: gst-libs/gst/gl/gstglshaderstrings.c
> @@ +45,3 @@
> +    "   gl_Position = u_transformation * a_position;\n"
> +    "   v_texcoord = a_texcoord;\n"
> +    "}\n";
> 
> Why do you need another shader? You can do the same with the existing
> gst_gl_shader_string_vertex_mat4_texture_transform shader with a slightly
> different matrix.

I have some issue by using the exist shader. I apply the rotation transform to
the texture coordinate,then the video frame seems to be repeat of one single
line, is there something wrong with my code?

My transform is such as clockwise-90:
0.0f, -1.0f,  0.0,  0.0f,
1.0f,  0.0f,  0.0,  0.0f,
0.0f,  0.0f,  1.0,  0.0f,
0.0f,  0.0f,  0.0,  1.0f,

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list