Compare commits

11 Commits

Author SHA1 Message Date
Rafał Dzięgiel
ff054743e6 flatpak: Sync with Flathub 2025-07-19 15:39:42 +02:00
Rafał Dzięgiel
9432156aec flatpak: Sync with Flathub 2025-07-19 14:54:02 +02:00
Rafał Dzięgiel
47d3ebe693 Revert "flatpak: Skip libmpeg2 build for now"
This reverts commit f63e13ed39.

This workaround does not work, since GStreamer build manifest we use
as shared module from Flathub has explicitly enabled libmpeg2 support.
2025-07-19 12:56:13 +02:00
Rafał Dzięgiel
5f8270f0e8 clapper-app: Retain compatibility with older graphviz 2025-07-19 12:49:01 +02:00
Rafał Dzięgiel
54f059aaa3 clapper-app: Correct pipeline SVG size variable type 2025-07-19 12:03:52 +02:00
Rafał Dzięgiel
f63e13ed39 flatpak: Skip libmpeg2 build for now
Source URI is dead. Build Flatpak without it until
fixed or mirror is found, so our CI works again.
2025-07-19 11:59:22 +02:00
Rafał Dzięgiel
daadabba8d Merge pull request #567 from Rafostar/mpris-compat
MPRIS compat changes
2025-06-26 19:44:07 +02:00
Rafał Dzięgiel
225e665aff clapper: Deprecate MPRIS feature
It was ported to Clapper Enhancers repo as a plugin and applications
using old one should slowy move towards using new plugin instead
2025-06-26 19:37:23 +02:00
Rafał Dzięgiel
31564b568b clapper-app: Prefer MPRIS enhancer over feature object
First try to find and use new MPRIS enhancer plugin, then old MPRIS feature as fallback
2025-06-26 19:09:34 +02:00
Rafał Dzięgiel
1c376612b8 clapper: Do not skip on loading ported enhancers
With some workarounds, we can make enhancers that were ported from
features still be loaded and used within single process without
requirement for building Clapper with their old implementations disabled.

Since MPRIS enhancer already has workarounds in place, lets just remove
all code that was skipping its loading.
2025-06-26 19:06:02 +02:00
Rafał Dzięgiel
c4afd8bea1 Merge pull request #565 from Rafostar/timeline-improvements
Timeline improvements
2025-06-24 19:22:12 +02:00
7 changed files with 52 additions and 52 deletions

View File

@@ -582,7 +582,7 @@ _create_pipeline_svg_file_in_thread (GTask *task, GObject *source G_GNUC_UNUSED,
GVC_t *gvc;
gchar *path, *template = NULL, *dot_data = NULL, *img_data = NULL;
gint fd;
guint size = 0;
gsize size = 0;
if (!(tmp_subdir = _create_tmp_subdir ("pipelines", cancellable, &error)))
goto finish;
@@ -610,7 +610,16 @@ _create_pipeline_svg_file_in_thread (GTask *task, GObject *source G_GNUC_UNUSED,
gvc = gvContext ();
gvLayout (gvc, graph, "dot");
#ifdef HAVE_GVC_13
gvRenderData (gvc, graph, "svg", &img_data, &size);
#else
{
guint tmp_size = 0; // Temporary uint to satisfy older API
gvRenderData (gvc, graph, "svg", &img_data, &tmp_size);
size = tmp_size;
}
#endif
agclose (graph);
gvFreeContext (gvc);

View File

@@ -1237,6 +1237,8 @@ clapper_app_window_constructed (GObject *object)
ClapperAppWindow *self = CLAPPER_APP_WINDOW_CAST (object);
ClapperPlayer *player = clapper_app_window_get_player (self);
ClapperQueue *queue = clapper_player_get_queue (player);
ClapperEnhancerProxyList *proxies = clapper_player_get_enhancer_proxies (player);
ClapperEnhancerProxy *proxy;
ClapperGtkExtraMenuButton *button;
AdwStyleManager *manager;
@@ -1250,10 +1252,6 @@ clapper_app_window_constructed (GObject *object)
#if (CLAPPER_HAVE_MPRIS || CLAPPER_HAVE_SERVER || CLAPPER_HAVE_DISCOVERER)
ClapperFeature *feature = NULL;
#endif
#if (!CLAPPER_HAVE_MPRIS || !CLAPPER_HAVE_SERVER || !CLAPPER_HAVE_DISCOVERER)
ClapperEnhancerProxyList *proxies = clapper_player_get_enhancer_proxies (player);
ClapperEnhancerProxy *proxy;
#endif
gchar mpris_name[45];
g_snprintf (mpris_name, sizeof (mpris_name),
@@ -1262,7 +1260,6 @@ clapper_app_window_constructed (GObject *object)
self->settings = g_settings_new (CLAPPER_APP_ID);
self->last_volume = PERCENTAGE_ROUND (g_settings_get_double (self->settings, "volume"));
#if !CLAPPER_HAVE_MPRIS
if ((proxy = clapper_enhancer_proxy_list_get_proxy_by_module (proxies, "clapper-mpris"))) {
clapper_enhancer_proxy_set_locally (proxy,
"own-name", mpris_name,
@@ -1270,14 +1267,15 @@ clapper_app_window_constructed (GObject *object)
"desktop-entry", CLAPPER_APP_ID,
"queue-controllable", TRUE, NULL);
gst_object_unref (proxy);
}
#else
feature = CLAPPER_FEATURE (clapper_mpris_new (
mpris_name, CLAPPER_APP_NAME, CLAPPER_APP_ID));
clapper_mpris_set_queue_controllable (CLAPPER_MPRIS (feature), TRUE);
clapper_player_add_feature (player, feature);
gst_object_unref (feature);
} else {
#if CLAPPER_HAVE_MPRIS
feature = CLAPPER_FEATURE (clapper_mpris_new (
mpris_name, CLAPPER_APP_NAME, CLAPPER_APP_ID));
clapper_mpris_set_queue_controllable (CLAPPER_MPRIS (feature), TRUE);
clapper_player_add_feature (player, feature);
gst_object_unref (feature);
#endif
}
#if CLAPPER_HAVE_SERVER
feature = CLAPPER_FEATURE (clapper_server_new ());

View File

@@ -105,6 +105,9 @@ if not pp_option.disabled()
if cgraph_dep.found() and gvc_dep.found()
clapperapp_c_args += ['-DHAVE_GRAPHVIZ']
clapperapp_deps += [cgraph_dep, gvc_dep]
if gvc_dep.version().version_compare('>= 13.0.0')
clapperapp_c_args += ['-DHAVE_GVC_13']
endif
clapperapp_available_functionalities += 'pipeline-preview'
elif pp_option.enabled()
error('pipeline-preview option was enabled, but required dependencies were not found')

View File

@@ -34,8 +34,6 @@ static HMODULE _enhancers_dll_handle = NULL;
#include "clapper-extractable.h"
#include "clapper-reactable.h"
#include <clapper-functionalities-availability.h>
#define GST_CAT_DEFAULT clapper_enhancers_loader_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
@@ -134,36 +132,6 @@ clapper_enhancers_loader_initialize (ClapperEnhancerProxyList *proxies)
ClapperEnhancerProxy *proxy;
gboolean filled;
/* FIXME: 1.0: Remove together with features code and manager.
* These would clash with each other, so avoid loading these
* as enhancers when also compiled as part of the library. */
#if (CLAPPER_HAVE_MPRIS || CLAPPER_HAVE_DISCOVERER || CLAPPER_HAVE_SERVER)
guint f_index;
const gchar *module_name = peas_plugin_info_get_module_name (info);
const gchar *ported_features[] = {
#if CLAPPER_HAVE_MPRIS
"clapper-mpris",
#endif
#if CLAPPER_HAVE_DISCOVERER
"clapper-discoverer",
#endif
#if CLAPPER_HAVE_SERVER
"clapper-server",
#endif
};
for (f_index = 0; f_index < G_N_ELEMENTS (ported_features); ++f_index) {
if (strcmp (module_name, ported_features[f_index]) == 0) {
GST_INFO ("Skipped \"%s\" enhancer module, since its"
" loaded from deprecated feature object", module_name);
g_clear_object (&info);
}
}
if (!info) // cleared when exists as feature
continue;
#endif
/* Clapper supports only 1 proxy per plugin. Each plugin can
* ship 1 class, but it can implement more than 1 interface. */
proxy = clapper_enhancer_proxy_new_global_take ((GObject *) info);

View File

@@ -23,6 +23,8 @@
*
* Not every OS supports `MPRIS`. Use [const@Clapper.HAVE_MPRIS] macro
* to check if Clapper API was compiled with this feature.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
#include "clapper-mpris.h"
@@ -1346,6 +1348,8 @@ clapper_mpris_property_changed (ClapperFeature *feature, GParamSpec *pspec)
* Creates a new #ClapperMpris instance.
*
* Returns: (transfer full): a new #ClapperMpris instance.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
ClapperMpris *
clapper_mpris_new (const gchar *own_name, const gchar *identity,
@@ -1376,6 +1380,8 @@ clapper_mpris_new (const gchar *own_name, const gchar *identity,
*
* You probably want to keep this disabled if your application
* is supposed to manage what is played now and not MPRIS client.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
void
clapper_mpris_set_queue_controllable (ClapperMpris *self, gboolean controllable)
@@ -1397,6 +1403,8 @@ clapper_mpris_set_queue_controllable (ClapperMpris *self, gboolean controllable)
* Get whether remote `MPRIS` clients can control [class@Clapper.Queue].
*
* Returns: %TRUE if control over #ClapperQueue is allowed, %FALSE otherwise.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
gboolean
clapper_mpris_get_queue_controllable (ClapperMpris *self)
@@ -1412,6 +1420,8 @@ clapper_mpris_get_queue_controllable (ClapperMpris *self)
* @art_url: (nullable): an art URL
*
* Set fallback artwork to show when media does not provide one.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
void
clapper_mpris_set_fallback_art_url (ClapperMpris *self, const gchar *art_url)
@@ -1435,6 +1445,8 @@ clapper_mpris_set_fallback_art_url (ClapperMpris *self, const gchar *art_url)
* Get fallback art URL earlier set by user.
*
* Returns: (transfer full) (nullable): fallback art URL.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
gchar *
clapper_mpris_get_fallback_art_url (ClapperMpris *self)
@@ -1611,6 +1623,8 @@ clapper_mpris_class_init (ClapperMprisClass *klass)
* Each #ClapperMpris instance running on the same system must have an unique name.
*
* Example: "org.mpris.MediaPlayer2.MyPlayer.instance123"
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
param_specs[PROP_OWN_NAME] = g_param_spec_string ("own-name",
NULL, NULL, NULL,
@@ -1622,6 +1636,8 @@ clapper_mpris_class_init (ClapperMprisClass *klass)
* A friendly name to identify the media player.
*
* Example: "My Player"
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
param_specs[PROP_IDENTITY] = g_param_spec_string ("identity",
NULL, NULL, NULL,
@@ -1631,6 +1647,8 @@ clapper_mpris_class_init (ClapperMprisClass *klass)
* ClapperMpris:desktop-entry:
*
* The basename of an installed .desktop file with the ".desktop" extension stripped.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
param_specs[PROP_DESKTOP_ENTRY] = g_param_spec_string ("desktop-entry",
NULL, NULL, NULL,
@@ -1640,6 +1658,8 @@ clapper_mpris_class_init (ClapperMprisClass *klass)
* ClapperMpris:queue-controllable:
*
* Whether remote MPRIS clients can control #ClapperQueue.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
param_specs[PROP_QUEUE_CONTROLLABLE] = g_param_spec_boolean ("queue-controllable",
NULL, NULL, DEFAULT_QUEUE_CONTROLLABLE,
@@ -1649,6 +1669,8 @@ clapper_mpris_class_init (ClapperMprisClass *klass)
* ClapperMpris:fallback-art-url:
*
* Fallback artwork to show when media does not provide one.
*
* Deprecated: 0.10: Use MPRIS from `clapper-enhancers` repo instead.
*/
param_specs[PROP_FALLBACK_ART_URL] = g_param_spec_string ("fallback-art-url",
NULL, NULL, NULL,

View File

@@ -34,22 +34,22 @@ G_BEGIN_DECLS
#define CLAPPER_TYPE_MPRIS (clapper_mpris_get_type())
#define CLAPPER_MPRIS_CAST(obj) ((ClapperMpris *)(obj))
CLAPPER_API
CLAPPER_DEPRECATED
G_DECLARE_FINAL_TYPE (ClapperMpris, clapper_mpris, CLAPPER, MPRIS, ClapperFeature)
CLAPPER_API
CLAPPER_DEPRECATED
ClapperMpris * clapper_mpris_new (const gchar *own_name, const gchar *identity, const gchar *desktop_entry);
CLAPPER_API
CLAPPER_DEPRECATED
void clapper_mpris_set_queue_controllable (ClapperMpris *mpris, gboolean controllable);
CLAPPER_API
CLAPPER_DEPRECATED
gboolean clapper_mpris_get_queue_controllable (ClapperMpris *mpris);
CLAPPER_API
CLAPPER_DEPRECATED
void clapper_mpris_set_fallback_art_url (ClapperMpris *mpris, const gchar *art_url);
CLAPPER_API
CLAPPER_DEPRECATED
gchar * clapper_mpris_get_fallback_art_url (ClapperMpris *mpris);
G_END_DECLS