Recent API changes?

Added by Martin Kelly about 2 years ago

Hi,

I'm trying to get the imms audacious plugin working with the latest 3.6.x, 3.7.x audacious builds. Unfortunately, it seems like the plugin API changed somewhere between 3.5 and 3.6, requiring some code changes to the imms plugin. Before I dive into these one-by-one, I'm wondering if someone here can point me at some documentation discussing the API changes, or an informal description of what changed so I can make the necessary code changes to imms.

As a few examples of the issues I'm seeing:
- It appears that the audacious includes have moved into libaudcore. Are there any API breakages from this, or is it just a rename?

- audacious/dbus.h no longer exists, as it appears audacious moved to GDBus. Any changes needed from the plugins here?

- AUD_GENERAL_PLUGIN no longer exists. Is it needed anymore, or is there a substitute?

- Audacious now requires C++ 2011. Do the plugins need it too?

(By the way, thanks for keeping audacious going; it's been my favorite music player for years and helps fulfill the huge gap left by xmms!).

Thanks!
Martin


Replies (5)

RE: Recent API changes? - Added by John Lindgren about 2 years ago

1) The plugin API changed substantially due to the switch from C to C++. The best way to get to know the new API is by looking at the various headers; they are intended to be human-readable. If you are missing some API function and can't find a replacement, please ask.
2) There was never a good reason for a plugin to be using audacious/dbus.h.
3) Plugins are now declared using C++ classes. For an example of a general plugin, try audacious-plugins/src/notify/notify.cc.
4) C++11 (or later) is a requirement.

RE: Recent API changes? - Added by John Lindgren about 2 years ago

https://github.com/jlindgren90/imms is a minimal port that compiles, not really tested.

RE: Recent API changes? - Added by Martin Kelly about 2 years ago

Thanks! I'll try that out when I get the time. I noticed that most plugins are currently in audacious-plugins rather than being externally hosted. What's the history behind that? Do you think it would be feasible to get imms into there as well to ease maintenance burdens?

RE: Recent API changes? - Added by Martin Kelly about 2 years ago

Unfortunately it doesn't work; it starts up but never reports anything to immsd. I'll debug into it further if/when I get the time. Thanks again for your help.

RE: Recent API changes? - Added by Martin Kelly about 2 years ago

Looks like I wasn't patient enough; imms waits a while to flush its output to the logs, and it doesn't flush when audacious closes (which was my test case). There's some funny warnings, but it generally seems to be working. For all I know, the warnings are usual and expected.

I'll ask the imms maintainer(s) to consider your patches.

(1-5/5)