gstreamer/gst-libs/gst/gl/glprototypes/sync.h
Matthew Waters 6bb113f685 gl: add a sync meta for synchronizing across GL contexts
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.

This meta would be placed on buffers that are known to cross from
one context to another.  The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00

47 lines
1.7 KiB
C

/*
* GStreamer
* Copyright (C) 2014 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
GST_GL_EXT_BEGIN (sync,
GST_GL_API_OPENGL3,
3, 2,
3, 0,
"",
"")
GST_GL_EXT_FUNCTION (GLsync, FenceSync,
(GLenum condition,
GLbitfield flags))
GST_GL_EXT_FUNCTION (GLboolean, IsSync,
(GLsync sync))
GST_GL_EXT_FUNCTION (void, DeleteSync,
(GLsync sync))
GST_GL_EXT_FUNCTION (GLenum, ClientWaitSync,
(GLsync sync,
GLbitfield flags,
GLuint64 timeout))
GST_GL_EXT_FUNCTION (void, WaitSync,
(GLsync sync,
GLbitfield flags,
GLuint64 timeout))
GST_GL_EXT_FUNCTION (void, GetSynciv,
(GLsync sync,
GLenum flags,
GLuint64 timeout))
GST_GL_EXT_END ()