Skip to contentSkip to conversation

gst-player: add

PATCH New Ross Burton 1 participant 3 messages Feb 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 gst-player: add

gst-player is a convenience library for handling media playback in GStreamer. It also has a sample application that can be used as a basic media player for testing.

Patch in a file selector for use without a terminal and a desktop file so it appears in the desktop.

---
 .../gstreamer/gst-player/filechooser.patch         |   54 ++++++++++++++++++++
 .../gstreamer/gst-player/gst-player.desktop        |   10 ++++
 .../recipes-multimedia/gstreamer/gst-player_git.bb |   31 +++++++++++
 3 files changed, 95 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
 create mode 100644 meta/recipes-multimedia/gstreamer/gst-player_git.bb
meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch new file +54 -0
new file mode 100644
index 0000000..7bf1b03
@@ -0,0 +1,54 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <[email protected]>
+
+From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Thu, 26 Feb 2015 17:17:05 +0000
+Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed
+
+---
+ gtk/gtk-play.c |   28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index f015077..9766a72 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv)
+   // FIXME: Add support for playlists and stuff
+   /* Parse the list of the file names we have to play. */
+   if (!file_names) {
+-    g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME);
+-    return 1;
++    GtkWidget *chooser;
++    int res;
++
++    chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL,
++                                          GTK_FILE_CHOOSER_ACTION_OPEN,
++                                          "_Cancel", GTK_RESPONSE_CANCEL,
++                                          "_Open", GTK_RESPONSE_ACCEPT,
++                                          NULL);
++    g_object_set (chooser,
++                  "local-only", FALSE,
++                  "select-multiple", TRUE,
++                  NULL);
++
++    res = gtk_dialog_run (GTK_DIALOG (chooser));
++    if (res == GTK_RESPONSE_ACCEPT) {
++      GSList *l;
++
++      l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser));
++      while (l) {
++        play.uris = g_list_append (play.uris, l->data);
++        l = g_slist_delete_link (l, l);
++      }
++    } else {
++      return 0;
++    }
++    gtk_widget_destroy (chooser);
+   } else {
+     guint i;
+ 
+-- 
+1.7.10.4
+
meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop new file +10 -0
new file mode 100644
index 0000000..9eb6ada
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Media Player
+Comment=Basic media plaer
+Icon=audio-player
+TryExec=gtk-play
+Exec=gtk-play
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=GTK;AudioVideo;
meta/recipes-multimedia/gstreamer/gst-player_git.bb new file +31 -0
new file mode 100644
index 0000000..a7df526
@@ -0,0 +1,31 @@
+SUMMARY="GStreamer playback helper library and examples"
+
+LICENSE = "LGPL-2.0+"
+LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65"
+
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+3"
+
+SRC_URI = "git://github.com/sdroege/gst-player.git \
+           file://filechooser.patch \
+           file://gst-player.desktop"
+
+SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"
+
+S = "${WORKDIR}/git"
+
+inherit autotools gtk-doc lib_package pkgconfig
+
+do_configure_prepend() {
+	touch ${S}/ChangeLog
+}
+
+EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no"
+
+do_install_append() {
+	install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
+}
+
+FILES_${PN}-bin += "${datadir}/applications/*.desktop"
+
+RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta gstreamer1.0-plugins-good-meta gstreamer1.0-plugins-bad-meta gstreamer1.0-plugins-ugly-meta"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/3 sato: use gtk-play (from gst-player) instead of Gaku

The Gaku media player was always a bit incomplete and had some serious bugs. gst-player doesn't have these bugs, is maintained, and uses GStreamer 1.x.

---
 meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb +1 -1
index bc3e0fd..fa9a261 100644
@@ -49,7 +49,7 @@ WEB ?= ""
 SUMMARY_${PN}-apps = "Sato desktop - applications"
 RDEPENDS_${PN}-apps = "\
     leafpad \
-    gaku \
+    gtk-play \
     x11vnc \
     matchbox-terminal \
     sato-screenshot \
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/3 gaku: remove (replaced by gst-player)

In reply to Ross Burton

Gaku was buggy and use GStreamer 0.10, gst-player is less buggy and uses GStreamer 1.x.

---
 meta/recipes-sato/gaku/gaku_git.bb |   25 -------------------------
 1 file changed, 25 deletions(-)
 delete mode 100644 meta/recipes-sato/gaku/gaku_git.bb
meta/recipes-sato/gaku/gaku_git.bb deleted +0 -25
deleted file mode 100644
index 5e1cba5..0000000
@@ -1,25 +0,0 @@
-SUMMARY = "Simple music player using GTK+ and GStreamer"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://main.c;beginline=1;endline=20;md5=0c02b4ef945956832b37a036b9cc103a"
-DEPENDS = "gtk+ gstreamer libowl-av"
-
-RDEPENDS_${PN} = "gst-plugins-base-audioconvert \
-            gst-plugins-base-audioresample \
-            gst-plugins-base-typefindfunctions \
-            gst-plugins-base-playbin"
-
-RRECOMMENDS_${PN} = "gst-plugins-good-id3demux \
-               gst-plugins-base-vorbis \
-               gst-plugins-base-alsa \
-               gst-plugins-base-ogg \
-               ${COMMERCIAL_AUDIO_PLUGINS}"
-
-SRCREV = "a0be2fe4b5f12b8b07f4e3bd624b3729657f0ac5"
-PV = "0.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
Signature · 1 line
1.7.10.4