You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the end of liquidsoap/src/tools/gstreamer_utils.ml, Gstreamer.Loop.create () creates a loop in the global-default glib main context which runs the loop in the main thread instead of gstreamer_main_loop thread.
Tutils.create main () "gstreamer_main_loop" seems to intend to run the gstreamer loop in gstreamer_main_loop thread.
To run a gstreamer loop in gstreamer_main_loop thread,
crocket
changed the title
ocaml-gstreamer should create a loop in a new thread.
ocaml-gstreamer should run a loop in a new thread.
Jul 26, 2019
crocket
changed the title
ocaml-gstreamer should run a loop in a new thread.
ocaml-gstreamer should run a loop in the thread where it is created.
Jul 27, 2019
At the end of liquidsoap/src/tools/gstreamer_utils.ml,
Gstreamer.Loop.create ()
creates a loop in the global-default glib main context which runs the loop in the main thread instead ofgstreamer_main_loop
thread.Tutils.create main () "gstreamer_main_loop"
seems to intend to run the gstreamer loop ingstreamer_main_loop
thread.To run a gstreamer loop in
gstreamer_main_loop
thread,Gstreamer.Loop.create ()
inmain
which is, in turn, called ingstreamer_main_loop
thread.thread_context = g_main_context_new ()
g_main_context_push_thread_default(thread_context)
GMainLoop* loop = g_main_loop_new(thread_context, FALSE)
return { loop, thread_context }
g_main_loop_run(loop)
g_main_loop_unref(loop)
g_main_context_pop_thread_default(thread_context)
g_main_context_unref(thread_context)
g_source_attach(idle_source, thread_context)
instead ofg_source_attach(idle_source, NULL)
I don't know whether creating a new thread-default glib main context for
gstreamer_main_loop
thread breaks ocaml-gstreamer or liquidsoap.ocaml-gstreamer needs to stop depending on the global-default glib main context if it does.
The text was updated successfully, but these errors were encountered: