Re: Flickering with Socket and Plug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Paul,

thanks for your remark. Since Steinberg released the technical preview of VST3 with Linux support, I try to port my synthesizer. The SDK contains a tiny host called EditorHost. It simply opens up the GUI editor of a plug-in. The host uses gtkmm (like my plug-in) and passes the socket_id resp. the window id to the plug-in.

Until I switched to Ubuntu 17.04 everything was running smooth already. Unfortunately it started flickering.

So, in case of Ardour the plug-in has to use gtkmm for building its GUI, right? Using another GUI framework is not possible.

OT: Any plans of having VST3 in Ardour for Linux?

René

On 26.09.2017 20:13, Paul Davis wrote:
For whatever it's worth, I was working on a similar plugin situation 16 years ago.  I tried using plug+socket. Couldn't make it work. GTK+ developers at the time told me to stop using it.

We now get a Gtk::Widget* from a plugin and add that to our own Gtk::Window.

On Tue, Sep 26, 2017 at 1:54 PM, René Hansen <rene@xxxxxxxxxxxxxxx <mailto:rene@xxxxxxxxxxxxxxx>> wrote:

    Hey Eric,

        It looks like you are trying to paint a surface 100 times every
        16ms.
        Maybe not such a good thing to do.


    Yes, I agree but that's on purpose in order to make the problem
    *very* obvious ;) In one of my projects I draw round about 25
    bitmaps (which partly overlap) onto the drawingarea. While some
    mouse interaction takes place I need to redraw several times. This
    results in flickering of all single bitmaps almost everytime I
    redraw. It looks as if the drawingarea gets cleared before I finish
    drawing my bitmaps.

    > The plug and socket are separate programs. You would start your socket
    > and add one or more plugs to it. Each plug is running as it's own
    > process.

    Yes, that's correct. But in the documentation of Gtk::Socket::add_id
    it says:
    "Adds an XEMBED client, such as a Gtk::Plug, to the Gtk::Socket.
    The client may be in the same process or in a different process."

    So I am of the assumption that both is possible. Either Socket and
    Plug live in the same process or different processes. Is that correct?

    Some details about my real world project (I hope it is not too
    confusing). I have a host application (executable) which builds its
    GUI with Gtk. Then I have a plug-in (shared object resp. .so file)
    which also builds its GUI with Gtk. But the plug-ins GUI must be
    shown by embedding it into the host application (like x11 is capable
    of). So I pass the socket_id of the host to the plug-in so it can
    connect by creating a plug. The plug-in lives inside the host
    application's process. But it is also possible that the host creates
    an extra process to let the plug-in run, but still, the GUI must be
    shown inside the host application. Both scenarios are possible.

    > There is some socket and plug test code at the following.
    ...
    > I just added a frame clock to the plug. If you are looking to animate a drawing in a plug that might be of some help.

    Thanks! I will have closer look and try to figure out how this works.

    > If you are programming in C++, the gtkmm tutorial is very good.

    Yes, I know this one, built it and let it run successfully. No
    flickering. Afterwards I extended this example by having both socket
    and plug in the same process. I added some idle call to the plug and
    let it draw a bunch of bitmaps. It started flickering. Then I
    removed all the gtkmm stuff in order to have plain Gtk code. And
    this is the example I have put on my github ;)

    Thanks for help. I will study your "plug2.c" example and see what I
    will come up with.


    René
    _______________________________________________
    gtk-list mailing list
    gtk-list@xxxxxxxxx <mailto:gtk-list@xxxxxxxxx>
    https://mail.gnome.org/mailman/listinfo/gtk-list
    <https://mail.gnome.org/mailman/listinfo/gtk-list>


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux