示例#1
0
static void appsrc_need_data_cb(GstAppSrc *gas, guint length, gpointer user_data)
{
  appsrc *as = (appsrc*)user_data;

  caml_c_thread_register();
  caml_acquire_runtime_system();
  caml_callback(as->need_data_cb, Val_int(length));
  caml_release_runtime_system();
  caml_c_thread_unregister();
}
示例#2
0
static GstFlowReturn appsink_new_sample_cb(GstAppSink *gas, gpointer user_data)
{
  appsink *as = (appsink*)user_data;

  caml_c_thread_register();
  caml_acquire_runtime_system();
  caml_callback(as->new_sample_cb, Val_unit);
  caml_release_runtime_system();
  caml_c_thread_unregister();

  return GST_FLOW_OK;
}
示例#3
0
文件: ffi.c 项目: mitls/mitls-fstar
// Unregister the calling thread, so it can no longer call miTLS.  Returns 1 for success, 0 for error.
int FFI_mitls_thread_unregister(void)
{
    return caml_c_thread_unregister();
}