16 Commits

Author SHA1 Message Date
Rafał Dzięgiel
21d0ba654b WIP: clapper-gtk: Add new ClapperGtkEngageLayer widget 2024-05-03 09:29:02 +02:00
Rafał Dzięgiel
6941f1b042 clapper: Small fix for "init_check" doc
The error arg was removed, but documentation was not updated then
2024-05-02 14:38:25 +02:00
Rafał Dzięgiel
df50802871 clapper-gtk: billboard: Documentation fixes
Billboard does not post automatic volume/speed announcements. It did at
some point during development, but it was scrapped in favour of letting
app use callbacks of "notify" signals to call announce speed/volume.
2024-05-02 13:17:09 +02:00
Rafał Dzięgiel
b1613273d0 gst-plugin: Avoid GTK crash after context is destroyed
It seems GTK continues using created contexts, so we cannot unref it here.
Looking at GTK sink implementation for GtkVideo, I see that they do not
unref it either, but since we use surfaceless context it would be probably
better to have a static GstDisplay and reuse the same context in future.
2024-05-02 11:14:29 +02:00
Rafał Dzięgiel
35527e5c14 clapper-gtk: Ignore missing plugins for metadata
Some media files have custom/proprietary metadata.
It should be safe to simply ignore these, since we do
not map metadata to any sort of Clapper stream anyway.

Fixes #441
2024-05-01 16:32:35 +02:00
Rafał Dzięgiel
e060048969 Merge pull request #429 from 1Maxnet1/patch-1
Complement com.github.rafostar.Clapper.metainfo.xml
2024-05-01 11:45:25 +02:00
Rafał Dzięgiel
09648bbc43 Mention Rust bindings in README.md
Closes #411
2024-04-29 21:38:37 +02:00
Max Buchholz
9e5f9e3d07 Add comment to document categories
Co-authored-by: Rafał Dzięgiel <40623528+Rafostar@users.noreply.github.com>
2024-04-29 20:19:10 +02:00
Rafał Dzięgiel
23c5e7ca65 clapper: Fix MARKER_NO_END value in GIR
Needs a cast from int, otherwise GIR is generated
incorrectly and it ends up as positive number.
2024-04-29 17:50:54 +02:00
Rafał Dzięgiel
6d47aa3c6d clapper-app: metainfo: Update branding colors
Change to values suggested by Tobias Bernard
2024-04-27 16:20:33 +02:00
Rafał Dzięgiel
ae3d75a8b5 clapper-app: metainfo: Update app summary
Change to a text suggested by Tobias Bernard
2024-04-27 16:20:17 +02:00
Rafał Dzięgiel
3561bc8c6f Update README.md 2024-04-27 15:59:28 +02:00
Rafał Dzięgiel
368a484741 flatpak: Sync with Flathub 2024-04-27 15:40:38 +02:00
Rafał Dzięgiel
b3ac64e5b1 clapper-app: Show development versions in about window
Since during development we do not put new release tag into metainfo
which about window uses to know app version, set it manually to the
library version since they are the same.
2024-04-27 14:19:45 +02:00
Rafał Dzięgiel
c873c35fa7 Back to development 2024-04-27 14:14:39 +02:00
Max Buchholz
af47dcb5e5 Complement com.github.rafostar.Clapper.metainfo.xml 2024-04-25 10:54:09 +02:00
21 changed files with 201 additions and 82 deletions

View File

@@ -31,6 +31,8 @@ Both libraries support *GObject Introspection* bindings. A simple application ex
Above libraries are licensed under `LGPL-2.1-or-later`. You are free to use them in your own projects as long as you comply with license terms.
Please note that until version 1.0 they should be considered as an unstable API (some things may change without prior notice).
Clapper `Vala` bindings are part of this repo, while `Rust` bindings can be found [here](https://gitlab.gnome.org/JanGernert/clapper-rs).
## Installation from Flatpak
The `Flatpak` package includes all required dependencies and codecs.
Additionally it also has a few patches, thus some functionalities work better in `Flatpak` version (until my changes are accepted upstream).
@@ -54,6 +56,8 @@ meson compile
sudo meson install
```
If you want to compile app as `Flatpak`, remember to clone this repo with `--recurse-submodules` option.
## Questions?
Feel free to ask me any questions. Come and talk on Matrix: [#clapper-player:matrix.org](https://matrix.to/#/#clapper-player:matrix.org)
@@ -68,5 +72,6 @@ so if your language is not available, please contact me first.
Many thanks to [sp1ritCS](https://github.com/sp1ritCS) for creating and maintaining package build files.
Big thanks to [bridadan](https://github.com/bridadan) and [Uniformbuffer3](https://github.com/Uniformbuffer3) for helping
with testing V4L2 and NVDEC hardware acceleration methods.
Also words of appreciation for [JanGernert](https://gitlab.gnome.org/JanGernert) who made and is sharing Clapper Rust bindings.
Thanks a lot to all the people who are supporting the development with their anonymous donations through [Liberapay](https://liberapay.com/Clapper/). I :heart: U.

View File

@@ -1,5 +1,5 @@
project('clapper', 'c',
version: '0.6.0',
version: '0.7.0',
meson_version: '>= 0.64.0',
license: 'LGPL-2.1-or-later AND GPL-3.0-or-later', # LGPL-2.1+ for libs and gst-plugin, GPL-3.0+ for app
default_options: [

View File

@@ -39,14 +39,14 @@
},
"modules": [
"flathub/shared-modules/gudev/gudev.json",
"testing/liba52.json",
"flathub/lib/liba52.json",
"flathub/lib/libmpeg2.json",
"flathub/lib/libdv.json",
"flathub/lib/libdvdcss.json",
"flathub/lib/libdvdread.json",
"flathub/lib/libdvdnav.json",
"flathub/lib/libass.json",
"testing/libmicrodns.json",
"flathub/lib/libmicrodns.json",
"testing/dav1d.json",
"testing/gstreamer.json",
"testing/gst-plugins-rs.json",

View File

@@ -31,7 +31,7 @@
],
"modules": [
"flathub/shared-modules/gudev/gudev.json",
"testing/liba52.json",
"flathub/lib/liba52.json",
"flathub/lib/libmpeg2.json",
"flathub/lib/libdv.json",
"flathub/lib/libdvdcss.json",
@@ -39,7 +39,7 @@
"flathub/lib/libdvdnav.json",
"flathub/lib/libass.json",
"flathub/lib/uchardet.json",
"testing/libmicrodns.json",
"flathub/lib/libmicrodns.json",
"flathub/gstreamer-1.0/gstreamer.json",
"testing/gtuber.json",
{

View File

@@ -1,23 +0,0 @@
--- ./configure~ 2002-07-28 06:50:42.000000000 +0300
+++ ./configure 2003-04-13 17:20:53.000000000 +0300
@@ -5366,13 +5366,13 @@
case "$host" in
i?86-* | k?-*)
- case "$host" in
- i386-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i386";;
- i486-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i486";;
- i586-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentium";;
- i686-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentiumpro";;
- k6-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=k6";;
- esac
+# case "$host" in
+# i386-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i386";;
+# i486-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i486";;
+# i586-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentium";;
+# i686-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentiumpro";;
+# k6-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=k6";;
+# esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports $TRY_CFLAGS $CFLAGS flags" >&5
printf %s "checking if $CC supports $TRY_CFLAGS $CFLAGS flags... " >&6; }
SAVE_CFLAGS="$CFLAGS"

View File

@@ -1,24 +0,0 @@
{
"name": "liba52",
"config-opts": [ "--enable-shared", "--disable-static" ],
"rm-configure": true,
"cleanup": [ "/bin/*a52*" ],
"sources": [
{
"type": "archive",
"url": "https://distfiles.adelielinux.org/source/a52dec/a52dec-0.8.0.tar.gz",
"sha256": "03c181ce9c3fe0d2f5130de18dab9bd8bc63c354071515aa56983c74a9cffcc9"
},
{
"type": "patch",
"path": "a52dec-configure-optflags.patch"
},
{
"type": "script",
"commands": [
"autoreconf -fiv"
],
"dest-filename": "autogen.sh"
}
]
}

View File

@@ -1,21 +0,0 @@
{
"name": "libmicrodns",
"buildsystem": "meson",
"config-opts": [
"--buildtype=release",
"-Dtests=disabled",
"-Dexamples=disabled"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/videolabs/libmicrodns.git",
"tag": "0.2.0",
"commit": "deb7ed7bf05dc26802a0ca1987049b31405b8930"
}
]
}

View File

@@ -19,6 +19,7 @@
#include <glib/gi18n.h>
#include <gst/gst.h>
#include <clapper/clapper.h>
#include <adwaita.h>
#include "clapper-app-about-window.h"
@@ -39,6 +40,9 @@ clapper_app_about_window_new (GtkApplication *gtk_app)
gtk_window_set_modal (GTK_WINDOW (about), TRUE);
gtk_window_set_transient_for (GTK_WINDOW (about), window);
/* Also show development versions */
adw_about_window_set_version (about, CLAPPER_VERSION_S);
/* TRANSLATORS: Put your name(s) here for credits or leave untranslated */
adw_about_window_set_translator_credits (about, _("translator-credits"));

View File

@@ -3,7 +3,7 @@
<component type="desktop-application">
<id>com.github.rafostar.Clapper</id>
<name>Clapper</name>
<summary>Simple and modern media player</summary>
<summary>Lean back and enjoy videos</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<!-- Old AppStream compat -->
@@ -17,6 +17,7 @@
<url type="bugtracker">https://github.com/Rafostar/clapper/issues</url>
<url type="donation">https://liberapay.com/Clapper</url>
<url type="help">https://github.com/Rafostar/clapper/wiki</url>
<url type="vcs-browser">https://github.com/Rafostar/clapper</url>
<description>
<p>
Clapper is a modern media player designed for simplicity and ease of use.
@@ -47,6 +48,11 @@
<image type="source">https://raw.githubusercontent.com/wiki/Rafostar/clapper/media/screenshot_05.png</image>
</screenshot>
</screenshots>
<!-- Linux Phone Apps parses categories from XML -->
<categories>
<category>AudioVideo</category>
<category>Video</category>
</categories>
<releases>
<release version="0.6.0" date="2024-04-22">
<description>
@@ -254,8 +260,8 @@
</releases>
<content_rating type="oars-1.1" />
<branding>
<color type="primary" scheme_preference="light">#9141ac</color>
<color type="primary" scheme_preference="dark">#241f31</color>
<color type="primary" scheme_preference="light">#8484ee</color>
<color type="primary" scheme_preference="dark">#1a1a74</color>
</branding>
<recommends>
<control>keyboard</control>

View File

@@ -290,7 +290,6 @@ clapper_gtk_billboard_unpin_pinned_message (ClapperGtkBillboard *self)
* side of @billboard.
*
* Use this if you want to present current volume level to the user.
* Note that @billboard also automatically announces volume changes.
*/
void
clapper_gtk_billboard_announce_volume (ClapperGtkBillboard *self)
@@ -336,7 +335,6 @@ clapper_gtk_billboard_announce_volume (ClapperGtkBillboard *self)
* side of @billboard.
*
* Use this if you want to present current speed value to the user.
* Note that @billboard also automatically announces speed changes.
*/
void
clapper_gtk_billboard_announce_speed (ClapperGtkBillboard *self)

View File

@@ -0,0 +1,102 @@
/* Clapper GTK Integration Library
* Copyright (C) 2024 Rafał Dzięgiel <rafostar.github@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/**
* ClapperGtkEngageLayer:
*
* A layer with big `play` button, engaging user to start the playback.
*
* #ClapperGtkEngageLayer widget is meant to be overlaid on top of
* [class@ClapperGtk.Video] as a normal (non-fading) overlay. It takes
* care of fading itself once clicked and/or when playback is started.
*
* Since: 0.8
*/
#include "config.h"
#include <clapper/clapper.h>
#include "clapper-gtk-engage-layer.h"
#define GST_CAT_DEFAULT clapper_gtk_engage_layer_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
struct _ClapperGtkEngageLayer
{
ClapperGtkLeadContainer parent;
};
#define parent_class clapper_gtk_engage_layer_parent_class
G_DEFINE_TYPE (ClapperGtkEngageLayer, clapper_gtk_engage_layer, CLAPPER_GTK_TYPE_LEAD_CONTAINER)
static void
adapt_cb (ClapperGtkContainer *container, gboolean adapt,
ClapperGtkEngageLayer *self)
{
GST_DEBUG_OBJECT (self, "Adapted: %s", (adapt) ? "yes" : "no");
}
/**
* clapper_gtk_engage_layer_new:
*
* Creates a new #ClapperGtkEngageLayer instance.
*
* Returns: a new playback engage layer #GtkWidget.
*
* Since: 0.8
*/
GtkWidget *
clapper_gtk_engage_layer_new (void)
{
return g_object_new (CLAPPER_GTK_TYPE_ENGAGE_LAYER, NULL);
}
static void
clapper_gtk_engage_layer_init (ClapperGtkEngageLayer *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
}
static void
clapper_gtk_engage_layer_dispose (GObject *object)
{
gtk_widget_dispose_template (GTK_WIDGET (object), CLAPPER_GTK_TYPE_ENGAGE_LAYER);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
clapper_gtk_engage_layer_class_init (ClapperGtkEngageLayerClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "clappergtkengagelayer", 0,
"Clapper GTK Engage Layer");
gobject_class->dispose = clapper_gtk_engage_layer_dispose;
gtk_widget_class_set_template_from_resource (widget_class,
CLAPPER_GTK_RESOURCE_PREFIX "/ui/clapper-gtk-engage-layer.ui");
gtk_widget_class_bind_template_callback (widget_class, adapt_cb);
gtk_widget_class_set_css_name (widget_class, "clapper-gtk-engage-layer");
}

View File

@@ -0,0 +1,41 @@
/* Clapper GTK Integration Library
* Copyright (C) 2024 Rafał Dzięgiel <rafostar.github@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#pragma once
#if !defined(__CLAPPER_GTK_INSIDE__) && !defined(CLAPPER_GTK_COMPILATION)
#error "Only <clapper-gtk/clapper-gtk.h> can be included directly."
#endif
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <clapper-gtk/clapper-gtk-lead-container.h>
G_BEGIN_DECLS
#define CLAPPER_GTK_TYPE_ENGAGE_LAYER (clapper_gtk_engage_layer_get_type())
#define CLAPPER_GTK_ENGAGE_LAYER_CAST(obj) ((ClapperGtkEngageLayer *)(obj))
G_DECLARE_FINAL_TYPE (ClapperGtkEngageLayer, clapper_gtk_engage_layer, CLAPPER_GTK, ENGAGE_LAYER, ClapperGtkLeadContainer)
GtkWidget * clapper_gtk_engage_layer_new (void);
G_END_DECLS

View File

@@ -1063,6 +1063,11 @@ static void
_player_missing_plugin_cb (ClapperPlayer *player, const gchar *name,
const gchar *installer_detail, ClapperGtkVideo *self)
{
/* Some media files have custom/proprietary metadata,
* it should be safe to simply ignore these */
if (g_str_has_prefix (name, "meta/"))
return;
/* XXX: Playbin2 seems to not emit state change here,
* so manually stop buffering animation just in case */
_set_buffering_animation_enabled (self, FALSE);

View File

@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/com/github/rafostar/Clapper/clapper-gtk">
<file preprocess="xml-stripblanks">ui/clapper-gtk-billboard.ui</file>
<file preprocess="xml-stripblanks">ui/clapper-gtk-engage-layer.ui</file>
<file preprocess="xml-stripblanks">ui/clapper-gtk-extra-menu-button.ui</file>
<file preprocess="xml-stripblanks">ui/clapper-gtk-seek-bar.ui</file>
<file preprocess="xml-stripblanks">ui/clapper-gtk-simple-controls.ui</file>

View File

@@ -26,6 +26,7 @@
#include <clapper-gtk/clapper-gtk-billboard.h>
#include <clapper-gtk/clapper-gtk-container.h>
#include <clapper-gtk/clapper-gtk-engage-layer.h>
#include <clapper-gtk/clapper-gtk-extra-menu-button.h>
#include <clapper-gtk/clapper-gtk-lead-container.h>
#include <clapper-gtk/clapper-gtk-next-item-button.h>

View File

@@ -80,6 +80,7 @@ clappergtk_headers = [
'clapper-gtk-enums.h',
'clapper-gtk-billboard.h',
'clapper-gtk-container.h',
'clapper-gtk-engage-layer.h',
'clapper-gtk-extra-menu-button.h',
'clapper-gtk-lead-container.h',
'clapper-gtk-next-item-button.h',
@@ -99,6 +100,7 @@ clappergtk_sources = [
'clapper-gtk-buffering-animation.c',
'clapper-gtk-buffering-paintable.c',
'clapper-gtk-container.c',
'clapper-gtk-engage-layer.c',
'clapper-gtk-extra-menu-button.c',
'clapper-gtk-lead-container.c',
'clapper-gtk-limited-layout.c',

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="clapper-gtk">
<template class="ClapperGtkEngageLayer" parent="ClapperGtkLeadContainer">
<property name="blocked-actions">toggle-play|reveal-overlays</property>
<child>
<object class="ClapperGtkTogglePlayButton">
<property name="halign">center</property>
<property name="valign">center</property>
<style>
<class name="osd"/>
<class name="flat"/>
<class name="circular"/>
</style>
</object>
</child>
</template>
</interface>

View File

@@ -43,7 +43,7 @@ G_DECLARE_FINAL_TYPE (ClapperMarker, clapper_marker, CLAPPER, MARKER, GstObject)
*
* The value used to indicate that marker does not have an ending time specified
*/
#define CLAPPER_MARKER_NO_END (-1.0)
#define CLAPPER_MARKER_NO_END ((gdouble) -1) // Needs a cast from int, otherwise GIR is generated incorrectly
ClapperMarker * clapper_marker_new (ClapperMarkerType marker_type, const gchar *title, gdouble start, gdouble end);

View File

@@ -83,7 +83,7 @@ clapper_init (int *argc, char **argv[])
* @argv: (inout) (array length=argc) (nullable) (optional): pointer to application's argv
*
* This function does the same thing as [func@Clapper.init], but instead of
* terminating on failure it returns %FALSE with @error set.
* terminating on failure it returns %FALSE.
*
* Returns: %TRUE if Clapper could be initialized, %FALSE otherwise.
*/

View File

@@ -473,7 +473,12 @@ gst_clapper_gl_context_handler_finalize (GObject *object)
gst_clear_object (&self->gst_display);
gst_clear_object (&self->wrapped_context);
gst_clear_object (&self->gst_context);
/* FIXME: It seems GTK continues using created contexts, so we cannot unref
* it here. Looking at GTK sink implementation for GtkVideo, I see that they
* do not unref it either, but since we use surfaceless context it would be
* probably better to have a static GstDisplay and reuse the same context. */
//gst_clear_object (&self->gst_context);
GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}