diff options
author | Matthew Waters <matthew@centricular.com> | 2015-09-10 00:00:11 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-09-10 00:33:40 +1000 |
commit | bca1fd1040ab085b63895b92720eb448df438bfa (patch) | |
tree | e93dddc8ed83dcd553ea0c30ddc569a8e854db87 /ext | |
parent | 591494ff5470033907e12dc695ced2c84b060aa8 (diff) | |
download | gstreamer-plugins-bad-bca1fd1040ab085b63895b92720eb448df438bfa.tar.gz |
qt: use our function table instead of directly calling gl functions
Otherwise when building with --as-needed we would need to link to
a GL or GLES library.
https://bugzilla.gnome.org/show_bug.cgi?id=754732
Diffstat (limited to 'ext')
-rw-r--r-- | ext/qt/gstqsgtexture.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc index a9be90c19..12810fafb 100644 --- a/ext/qt/gstqsgtexture.cc +++ b/ext/qt/gstqsgtexture.cc @@ -81,6 +81,7 @@ GstQSGTexture::setBuffer (GstBuffer * buffer) void GstQSGTexture::bind () { + const GstGLFuncs *gl; GstGLContext *context; GstGLSyncMeta *sync_meta; GstMemory *mem; @@ -95,6 +96,9 @@ GstQSGTexture::bind () if (!this->mem_) return; + g_assert (this->qt_context_); + gl = this->qt_context_->gl_vtable; + /* FIXME: should really lock the memory to prevent write access */ if (!gst_video_frame_map (&this->v_frame, &this->v_info, this->buffer_, (GstMapFlags) (GST_MAP_READ | GST_MAP_GL))) { @@ -113,13 +117,12 @@ GstQSGTexture::bind () gst_gl_sync_meta_set_sync_point (sync_meta, context); - g_assert (this->qt_context_); gst_gl_sync_meta_wait (sync_meta, this->qt_context_); tex_id = *(guint *) this->v_frame.data[0]; GST_LOG ("%p binding Qt texture %u", this, tex_id); - glBindTexture (GL_TEXTURE_2D, tex_id); + gl->BindTexture (GL_TEXTURE_2D, tex_id); gst_video_frame_unmap (&this->v_frame); } |