-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LV2: currently we need a X11 display since the Gtk Thread is unconditionally started #35
Comments
From the Gtk2 docs: https://developer-old.gnome.org/gtk2/stable/gtk2-General.html#gtk-init-check
There is no way we can support LV2 GUIs when DISPLAY is missing, but we can still register plugins and run them in headless mode. That means, try to init gtk and if that is not working, run LV2 plugins in the default glib main loop (the main loop context usually taken over by gtk). I.e. the plugins should still not live in the Anklang main loop. |
Anklang is meant to provide good support / usability for plugins without custom UIs, why should the stop working in headless mode? I.e. that'd violate the principle of least surprise.
That doesn't support the usual set of gtk options, use gtk_init_check() instead. |
Yes, I thought it might be too much work to get this right for the first version of LV2 support, but it turned out to be easier than I thought. Please review: |
Great, looks good (the first patch, i don't really know about suil). |
Using AnklangSynthEngine with LV2 support currently fails without $DISPLAY. This is because LV2 host is a singleton variable that loads gtk2wrap and starts the Gtk thread as soon as its instantiated.
The question is of course if the no display case should block the merge? If so, here are two options of how to support no-display, but there may be better solutions:
Option 1
We could disable LV2 support altogether if the Gtk thread could not be started, this has the advantage that it is relatively simple to implement.
Option 2
One way to deal with this would be to try to auto detect whether we have a display. One could use something like
gst123
does:and if that fails, start a thread that is not the Gtk thread in gtk2wrap. Then the LV2 plugins could run in that thread, but any custom UIs would have to be disabled.
The text was updated successfully, but these errors were encountered: