-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support libpeas based plugin system #501
Conversation
Currently, applications can quickly check an gboolean
clapper_enhancer_check (
GType iface_type,
const gchar* scheme,
const gchar* host,
const gchar** name
) AND check whether Clapper was even compiled with ability to load enhancers (requires Example: gboolean supported = clapper_enhancer_check (CLAPPER_TYPE_EXTRACTABLE, "https", "example.com", NULL); As requested in: GeopJr/Tuba#1171 ping @GeopJr |
Sounds good to me, thanks! And I'm interested in maintaining a few extractors probably :) |
Created a separate repo for enhancer type of plugins here. Also added there an I will later update this PR to fix CI with missing dependencies and replace |
5c36892
to
d4c47f9
Compare
Thanks. Hopefully now most of the hard stuff will be handled by Nonetheless, you are (and everyone else) always welcome to contribute (maybe even with new extractors). Now they can be written in |
The CI now passed, Flatpak was built and... it works! 🎉 |
647c991
to
cfc80eb
Compare
OK. So what was tested overall now:
In overall, everything "here" seems to work fine. What remains is to add/restore more extractors, but these can be even gradually added later (even after next Clapper version), since its another repo and |
Allow loading external plugins called "Enhancers" that as the name suggests, enhance Clapper library capabilities. Currently implemented is a "ClapperExtractable" interface meant to extract an actual media that GStreamer can later play from an initial input URI. Additionally, an internal GStreamer elements that work with it are ported/moved here from "gtuber" library that this functionality replaces.
Also add all required dependencies
Not needed to build the docs, so disable it
Required for enhancers loader
Add a
libpeas
based plugin system. In order to not be confused with GStreamer plugins, I will be using termenhancers
as these are meant to be callable from already present functionalities in Clapper library, enhancing them (possibly using other non-C libraries). These are meant mostly for either not actual playback and/or out of GStreamer scope functionalities.Currently implemented is
CLAPPER_EXTRACTABLE
, an interface for creating enhancers that extract data from different sources before letting it be played via GStreamer. Note that absolutely no actual extraction code is shipped as part of the app. For this reason loadableenhancers
system was invented.For now, this is meant to replace
gtuber
with something (hopefully) easier to maintain by using extractors from different libraries (that others will maintain instead of myself 😆).Issues:
Needs
CLAPPER_USE_PLAYBIN3=1
to play smoothly in HQ - not fixable here, we should change to playbin3 by default for next Clapper release anyway while other apps can already enforce it with env, so not a problem.Testing:
Both local build and Flatpak package from this PR CI (checks tab) work fine. Windows is currently untested.