deadbeef-mpris2-plugin icon indicating copy to clipboard operation
deadbeef-mpris2-plugin copied to clipboard

Suggestion: Remove threading code

Open saivert opened this issue 7 years ago • 4 comments

This already uses gdbus which is capable of working with the mainloop of the GTK UI plugin. I know there are alternative GUI plugins but it is recommended to not run a separate thread for dbus especially if you use gdbus. It is not necessary. I also resolved an issue by removing the threading code in my experimental build.

Check my branch here: https://github.com/saivert/deadbeef-mpris2-plugin/tree/remove_threading_code2 EDIT: recreated the branch to base on latest master

saivert avatar Apr 21 '17 18:04 saivert

thank you for your engagement with this plugin :)

I will take a look at the weekend.

Serranya avatar Apr 21 '17 19:04 Serranya

The commit works fine but i don't' like to remove the threading capability. Or does gdbus spawn its own thread anyway?

I don't want to depend on a running gkt-ui

Serranya avatar Apr 30 '17 11:04 Serranya

In my testing it spawns its own gdbus thread but I haven't tested it against non GTK UIs like the defunct Qt one. IMO on *nix platforms only the GTK UI is going to be used anyways as there are no other currently maintained UIs for it (AFAIK) and on Mac, mpris isn't usable anyways.

saivert avatar Apr 30 '17 13:04 saivert

Hi All. I would like to ask not to remove dedicated gdbus thread from this plugin since this will definitely impose dependency on a gui plugin running glib main loop. On a *nix platforms strict presence of gtk-ui is not necessary true: for example, I develop a Qt QML-based GUI to run deadbeef on Sailfish OS phones, and I use deadbeef-mpris2-plugin to provide MPRIS controls (which works perfectly BTW, thank you both and all other contributors also for your effort!).

Actually, Qt event loop typically run integrated glib main loop inside self (at least on linux), so plugin with removed threading probably will work on a Qt GUIs also, but this does not change the main conclusion: gtk-ui is not the only option on *nix platforms.

kravich avatar Jun 19 '19 10:06 kravich

Im closing this as this plugin is no longer maintained here. Please use https://github.com/DeaDBeeF-Player/deadbeef-mpris2-plugin instead.

Serranya avatar Mar 12 '23 11:03 Serranya