mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
9
.github/workflows/flatpak-nightly.yml
vendored
9
.github/workflows/flatpak-nightly.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
flatpak --system install -y --noninteractive flathub org.freedesktop.Sdk.Extension.rust-stable/${{ matrix.arch }}/24.08
|
flatpak --system install -y --noninteractive flathub org.freedesktop.Sdk.Extension.rust-stable/${{ matrix.arch }}/24.08
|
||||||
flatpak --system install -y --noninteractive flathub org.freedesktop.Sdk.Extension.llvm18/${{ matrix.arch }}/24.08
|
flatpak --system install -y --noninteractive flathub org.freedesktop.Sdk.Extension.llvm18/${{ matrix.arch }}/24.08
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
|
uses: flatpak/flatpak-github-actions/flatpak-builder@master
|
||||||
with:
|
with:
|
||||||
bundle: com.github.rafostar.Clapper.flatpak
|
bundle: com.github.rafostar.Clapper.flatpak
|
||||||
manifest-path: pkgs/flatpak/com.github.rafostar.Clapper-nightly.json
|
manifest-path: pkgs/flatpak/com.github.rafostar.Clapper-nightly.json
|
||||||
@@ -41,3 +41,10 @@ jobs:
|
|||||||
repository-url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
|
repository-url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
|
||||||
cache-key: flatpak-builder-${{ github.sha }}-testing-${{ github.run_number }}
|
cache-key: flatpak-builder-${{ github.sha }}-testing-${{ github.run_number }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
upload-artifact: false
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clapper-flatpak-nightly-${{ matrix.arch }}
|
||||||
|
path: com.github.rafostar.Clapper.flatpak
|
||||||
|
if-no-files-found: error
|
||||||
|
11
.github/workflows/flatpak.yml
vendored
11
.github/workflows/flatpak.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 600
|
timeout-minutes: 600
|
||||||
container:
|
container:
|
||||||
image: bilelmoussaoui/flatpak-github-actions:gnome-45
|
image: bilelmoussaoui/flatpak-github-actions:gnome-47
|
||||||
options: --privileged
|
options: --privileged
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -33,9 +33,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: arm64
|
platforms: arm64
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
|
uses: flatpak/flatpak-github-actions/flatpak-builder@master
|
||||||
with:
|
with:
|
||||||
bundle: com.github.rafostar.Clapper.flatpak
|
bundle: com.github.rafostar.Clapper.flatpak
|
||||||
manifest-path: pkgs/flatpak/com.github.rafostar.Clapper.json
|
manifest-path: pkgs/flatpak/com.github.rafostar.Clapper.json
|
||||||
cache-key: flatpak-builder-${{ github.sha }}
|
cache-key: flatpak-builder-${{ github.sha }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
upload-artifact: false
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clapper-flatpak-${{ matrix.arch }}
|
||||||
|
path: com.github.rafostar.Clapper.flatpak
|
||||||
|
if-no-files-found: error
|
||||||
|
@@ -89,6 +89,48 @@ playback_decoder_closure (ClapperAppInfoWindow *self, GstElement *decoder)
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gchar *
|
||||||
|
playback_sink_closure (ClapperAppInfoWindow *self, GstElement *sink)
|
||||||
|
{
|
||||||
|
GstElementFactory *factory;
|
||||||
|
GParamSpec *pspec;
|
||||||
|
gchar *text, *el_name, *child_name = NULL;
|
||||||
|
|
||||||
|
if (!sink || !(factory = gst_element_get_factory (sink)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
el_name = gst_object_get_name (GST_OBJECT_CAST (factory));
|
||||||
|
|
||||||
|
/* We want to show actual sink if it is configurable
|
||||||
|
* through a property (e.g. sink of "glsinkbin") */
|
||||||
|
if (GST_IS_BIN (sink)
|
||||||
|
&& ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (sink), "video-sink"))
|
||||||
|
|| (pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (sink), "sink")))
|
||||||
|
&& pspec->value_type == GST_TYPE_ELEMENT) {
|
||||||
|
GstElement *child = NULL;
|
||||||
|
GstElementFactory *child_factory;
|
||||||
|
|
||||||
|
g_object_get (sink, pspec->name, &child, NULL);
|
||||||
|
|
||||||
|
if (child) {
|
||||||
|
if ((child_factory = gst_element_get_factory (child)))
|
||||||
|
child_name = gst_object_get_name (GST_OBJECT_CAST (child_factory));
|
||||||
|
|
||||||
|
gst_object_unref (child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child_name) {
|
||||||
|
text = g_strdup_printf ("%s + %s", el_name, child_name);
|
||||||
|
g_free (el_name);
|
||||||
|
g_free (child_name);
|
||||||
|
} else {
|
||||||
|
text = el_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
static GtkSelectionModel *
|
static GtkSelectionModel *
|
||||||
create_no_selection_closure (ClapperAppInfoWindow *self, ClapperStreamList *stream_list)
|
create_no_selection_closure (ClapperAppInfoWindow *self, ClapperStreamList *stream_list)
|
||||||
{
|
{
|
||||||
@@ -218,6 +260,7 @@ clapper_app_info_window_class_init (ClapperAppInfoWindowClass *klass)
|
|||||||
gtk_widget_class_bind_template_callback (widget_class, media_duration_closure);
|
gtk_widget_class_bind_template_callback (widget_class, media_duration_closure);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, playback_element_name_closure);
|
gtk_widget_class_bind_template_callback (widget_class, playback_element_name_closure);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, playback_decoder_closure);
|
gtk_widget_class_bind_template_callback (widget_class, playback_decoder_closure);
|
||||||
|
gtk_widget_class_bind_template_callback (widget_class, playback_sink_closure);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, create_no_selection_closure);
|
gtk_widget_class_bind_template_callback (widget_class, create_no_selection_closure);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, has_streams_closure);
|
gtk_widget_class_bind_template_callback (widget_class, has_streams_closure);
|
||||||
}
|
}
|
||||||
|
@@ -21,18 +21,26 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <clapper/clapper.h>
|
#include <clapper/clapper.h>
|
||||||
|
|
||||||
|
#include "clapper-app-internal-visibility.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_make_stream_group_title (GtkListItem *list_item, ClapperStream *stream);
|
gchar * clapper_app_list_item_make_stream_group_title (GtkListItem *list_item, ClapperStream *stream);
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_make_resolution (GtkListItem *list_item, gint width, gint height);
|
gchar * clapper_app_list_item_make_resolution (GtkListItem *list_item, gint width, gint height);
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_make_bitrate (GtkListItem *list_item, guint value);
|
gchar * clapper_app_list_item_make_bitrate (GtkListItem *list_item, guint value);
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_convert_int (GtkListItem *list_item, gint value);
|
gchar * clapper_app_list_item_convert_int (GtkListItem *list_item, gint value);
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_convert_uint (GtkListItem *list_item, guint value);
|
gchar * clapper_app_list_item_convert_uint (GtkListItem *list_item, guint value);
|
||||||
|
|
||||||
|
CLAPPER_APP_INTERNAL_API
|
||||||
gchar * clapper_app_list_item_convert_double (GtkListItem *list_item, gdouble value);
|
gchar * clapper_app_list_item_convert_double (GtkListItem *list_item, gdouble value);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@@ -53,6 +53,19 @@ configure_file(
|
|||||||
configuration: config_h,
|
configuration: config_h,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
visibility_conf = configuration_data()
|
||||||
|
|
||||||
|
visibility_conf.set(
|
||||||
|
'CLAPPER_API',
|
||||||
|
'CLAPPER_APP_INTERNAL',
|
||||||
|
)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: '../../lib/shared/clapper-api-visibility.h.in',
|
||||||
|
output: 'clapper-app-internal-visibility.h',
|
||||||
|
configuration: visibility_conf,
|
||||||
|
)
|
||||||
|
|
||||||
clapperapp_sources = [
|
clapperapp_sources = [
|
||||||
'clapper-app-about-window.c',
|
'clapper-app-about-window.c',
|
||||||
'clapper-app-application.c',
|
'clapper-app-application.c',
|
||||||
@@ -77,6 +90,7 @@ clapperapp_sources = [
|
|||||||
]
|
]
|
||||||
clapperapp_c_args = [
|
clapperapp_c_args = [
|
||||||
'-DG_LOG_DOMAIN="ClapperApp"',
|
'-DG_LOG_DOMAIN="ClapperApp"',
|
||||||
|
'-DCLAPPER_APP_INTERNAL_COMPILATION',
|
||||||
'-DGST_USE_UNSTABLE_API',
|
'-DGST_USE_UNSTABLE_API',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -181,7 +181,7 @@
|
|||||||
<object class="ClapperAppPropertyRow">
|
<object class="ClapperAppPropertyRow">
|
||||||
<property name="title" translatable="yes">Sink</property>
|
<property name="title" translatable="yes">Sink</property>
|
||||||
<binding name="subtitle">
|
<binding name="subtitle">
|
||||||
<closure type="gchararray" function="playback_element_name_closure">
|
<closure type="gchararray" function="playback_sink_closure">
|
||||||
<lookup name="video-sink" type="ClapperPlayer">
|
<lookup name="video-sink" type="ClapperPlayer">
|
||||||
<lookup name="player">ClapperAppInfoWindow</lookup>
|
<lookup name="player">ClapperAppInfoWindow</lookup>
|
||||||
</lookup>
|
</lookup>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
<object class="ClapperAppPropertyRow">
|
<object class="ClapperAppPropertyRow">
|
||||||
<property name="title" translatable="yes">Sink</property>
|
<property name="title" translatable="yes">Sink</property>
|
||||||
<binding name="subtitle">
|
<binding name="subtitle">
|
||||||
<closure type="gchararray" function="playback_element_name_closure">
|
<closure type="gchararray" function="playback_sink_closure">
|
||||||
<lookup name="audio-sink" type="ClapperPlayer">
|
<lookup name="audio-sink" type="ClapperPlayer">
|
||||||
<lookup name="player">ClapperAppInfoWindow</lookup>
|
<lookup name="player">ClapperAppInfoWindow</lookup>
|
||||||
</lookup>
|
</lookup>
|
||||||
|
@@ -574,6 +574,8 @@ popover_map_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)
|
|||||||
|
|
||||||
GST_TRACE_OBJECT (self, "Popover map");
|
GST_TRACE_OBJECT (self, "Popover map");
|
||||||
|
|
||||||
|
gtk_widget_set_can_focus (widget, TRUE);
|
||||||
|
|
||||||
if (G_UNLIKELY (self->player == NULL))
|
if (G_UNLIKELY (self->player == NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -608,6 +610,11 @@ popover_unmap_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)
|
|||||||
|
|
||||||
GST_TRACE_OBJECT (self, "Popover unmap");
|
GST_TRACE_OBJECT (self, "Popover unmap");
|
||||||
|
|
||||||
|
/* Drop focus after popover is closed. Fixes issue
|
||||||
|
* with keyboard shortcuts not working when closed
|
||||||
|
* while within submenu */
|
||||||
|
gtk_widget_set_can_focus (widget, FALSE);
|
||||||
|
|
||||||
if (G_UNLIKELY (self->player == NULL))
|
if (G_UNLIKELY (self->player == NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -22,6 +22,11 @@
|
|||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <libpeas.h>
|
#include <libpeas.h>
|
||||||
|
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
static HMODULE _enhancers_dll_handle = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "clapper-enhancers-loader-private.h"
|
#include "clapper-enhancers-loader-private.h"
|
||||||
|
|
||||||
#define ENHANCER_INTERFACES "X-Interfaces"
|
#define ENHANCER_INTERFACES "X-Interfaces"
|
||||||
@@ -44,13 +49,29 @@ void
|
|||||||
clapper_enhancers_loader_initialize (void)
|
clapper_enhancers_loader_initialize (void)
|
||||||
{
|
{
|
||||||
const gchar *enhancers_path;
|
const gchar *enhancers_path;
|
||||||
gchar **dir_paths;
|
gchar **dir_paths, *custom_path = NULL;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "clapperenhancersloader", 0,
|
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "clapperenhancersloader", 0,
|
||||||
"Clapper Enhancer Loader");
|
"Clapper Enhancer Loader");
|
||||||
|
|
||||||
enhancers_path = g_getenv ("CLAPPER_ENHANCERS_PATH");
|
enhancers_path = g_getenv ("CLAPPER_ENHANCERS_PATH");
|
||||||
|
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
if (!enhancers_path || *enhancers_path == '\0') {
|
||||||
|
gchar *win_base_dir;
|
||||||
|
|
||||||
|
win_base_dir = g_win32_get_package_installation_directory_of_module (
|
||||||
|
_enhancers_dll_handle);
|
||||||
|
/* FIXME: Avoid hardcoded major version */
|
||||||
|
custom_path = g_build_filename (win_base_dir,
|
||||||
|
"lib", "clapper-0.0", "enhancers", NULL);
|
||||||
|
enhancers_path = custom_path; // assign temporarily
|
||||||
|
|
||||||
|
g_free (win_base_dir);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!enhancers_path || *enhancers_path == '\0')
|
if (!enhancers_path || *enhancers_path == '\0')
|
||||||
enhancers_path = CLAPPER_ENHANCERS_PATH;
|
enhancers_path = CLAPPER_ENHANCERS_PATH;
|
||||||
|
|
||||||
@@ -63,6 +84,7 @@ clapper_enhancers_loader_initialize (void)
|
|||||||
peas_engine_enable_loader (_engine, "python");
|
peas_engine_enable_loader (_engine, "python");
|
||||||
peas_engine_enable_loader (_engine, "gjs");
|
peas_engine_enable_loader (_engine, "gjs");
|
||||||
|
|
||||||
|
load_enhancers:
|
||||||
dir_paths = g_strsplit (enhancers_path, G_SEARCHPATH_SEPARATOR_S, 0);
|
dir_paths = g_strsplit (enhancers_path, G_SEARCHPATH_SEPARATOR_S, 0);
|
||||||
|
|
||||||
for (i = 0; dir_paths[i]; ++i)
|
for (i = 0; dir_paths[i]; ++i)
|
||||||
@@ -70,6 +92,11 @@ clapper_enhancers_loader_initialize (void)
|
|||||||
|
|
||||||
g_strfreev (dir_paths);
|
g_strfreev (dir_paths);
|
||||||
|
|
||||||
|
/* Support loading additional enhancers from non-default directory */
|
||||||
|
enhancers_path = g_getenv ("CLAPPER_ENHANCERS_EXTRA_PATH");
|
||||||
|
if (enhancers_path && *enhancers_path != '\0')
|
||||||
|
goto load_enhancers;
|
||||||
|
|
||||||
if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) >= GST_LEVEL_INFO) {
|
if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) >= GST_LEVEL_INFO) {
|
||||||
GListModel *list = (GListModel *) _engine;
|
GListModel *list = (GListModel *) _engine;
|
||||||
guint n_items = g_list_model_get_n_items (list);
|
guint n_items = g_list_model_get_n_items (list);
|
||||||
@@ -83,6 +110,8 @@ clapper_enhancers_loader_initialize (void)
|
|||||||
|
|
||||||
GST_INFO ("Clapper enhancers initialized, found: %u", n_items);
|
GST_INFO ("Clapper enhancers initialized, found: %u", n_items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (custom_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
|
Reference in New Issue
Block a user