コード例 #1
0
static void
_default_set_sync_gl (GstGLSyncMeta * sync_meta, GstGLContext * context)
{
  const GstGLFuncs *gl = context->gl_vtable;

  if (gl->FenceSync) {
    if (sync_meta->data) {
      GST_LOG ("deleting sync object %p", sync_meta->data);
      gl->DeleteSync ((GLsync) sync_meta->data);
    }
    sync_meta->data =
        (gpointer) gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
    GST_LOG ("setting sync object %p", sync_meta->data);
  }

  if (gst_gl_context_is_shared (context))
    gl->Flush ();
}
コード例 #2
0
static void
_default_set_sync_gl (GstGLSyncMeta * sync_meta, GstGLContext * context)
{
  const GstGLFuncs *gl = context->gl_vtable;

  if (gl->FenceSync) {
    if (sync_meta->data) {
      GST_LOG ("deleting sync object %p", sync_meta->data);
      gl->DeleteSync ((GLsync) sync_meta->data);
    }
    sync_meta->data =
        (gpointer) gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);

    if (gst_gl_context_is_shared (context))
      /* if we only have a single context, the wait will flush for us */
      gl->Flush ();
    GST_LOG ("setting sync object %p", sync_meta->data);
  } else {
    gl->Finish ();
  }
}