summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2015-10-15 23:47:11 +1100
committerMatthew Waters <matthew@centricular.com>2015-10-15 23:47:11 +1100
commit9ad6872b5b87596debc13363817e428d3ad019d5 (patch)
tree3d14b82dd69d6352bd03abe6ab2a0848bdb5d07d
parent924f2ca9864166ab4ddf0e44e85b5cb87238facf (diff)
downloadgstreamer-plugins-bad-9ad6872b5b87596debc13363817e428d3ad019d5.tar.gz
gl/caopengllayersink: port to new GstGLShader API
fixes build error: "undefined symbols for architecture: gst_gl_shader_compile_with_default_vf_and_check"
-rw-r--r--ext/gl/caopengllayersink.m15
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/gl/caopengllayersink.m b/ext/gl/caopengllayersink.m
index 506fbf52b..c1b9a81d9 100644
--- a/ext/gl/caopengllayersink.m
+++ b/ext/gl/caopengllayersink.m
@@ -889,13 +889,22 @@ static void
gst_ca_opengl_layer_sink_thread_init_redisplay (GstCAOpenGLLayerSink * ca_sink)
{
const GstGLFuncs *gl = ca_sink->context->gl_vtable;
+ GError *error = NULL;
ca_sink->redisplay_shader = gst_gl_shader_new (ca_sink->context);
- if (!gst_gl_shader_compile_with_default_vf_and_check
- (ca_sink->redisplay_shader, &ca_sink->attr_position,
- &ca_sink->attr_texture))
+ if (!(ca_sink->redisplay_shader = gst_gl_shader_new_default (ca_sink->context, &error))) {
+ GST_ERROR_OBJECT (ca_sink, "Failed to link shader: %s", error->message);
gst_ca_opengl_layer_sink_cleanup_glthread (ca_sink);
+ return;
+ }
+
+ ca_sink->attr_position =
+ gst_gl_shader_get_attribute_location (ca_sink->redisplay_shader,
+ "a_position");
+ ca_sink->attr_texture =
+ gst_gl_shader_get_attribute_location (ca_sink->redisplay_shader,
+ "a_texcoord");
if (gl->GenVertexArrays) {
gl->GenVertexArrays (1, &ca_sink->vao);