summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-02-26 17:59:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-27 07:36:02 +0000
commitf8b5481ba504028b0f14c57f800f245206a2bd15 (patch)
tree3528dea6767a79b47ae04bb5c74047cef10e6dfc /meta/recipes-multimedia/gstreamer
parent6d7cf8e9dd00bdff882311fecbadfadc46e9cc03 (diff)
downloadpoky-f8b5481ba504028b0f14c57f800f245206a2bd15.tar.gz
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. (From OE-Core rev: 07e79c259dda660715fcdf802af66273209670ba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch54
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop10
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player_git.bb31
3 files changed, 95 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch b/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
new file mode 100644
index 0000000000..7bf1b034b3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch
@@ -0,0 +1,54 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Thu, 26 Feb 2015 17:17:05 +0000
7Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed
8
9---
10 gtk/gtk-play.c | 28 ++++++++++++++++++++++++++--
11 1 file changed, 26 insertions(+), 2 deletions(-)
12
13diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
14index f015077..9766a72 100644
15--- a/gtk/gtk-play.c
16+++ b/gtk/gtk-play.c
17@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv)
18 // FIXME: Add support for playlists and stuff
19 /* Parse the list of the file names we have to play. */
20 if (!file_names) {
21- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME);
22- return 1;
23+ GtkWidget *chooser;
24+ int res;
25+
26+ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL,
27+ GTK_FILE_CHOOSER_ACTION_OPEN,
28+ "_Cancel", GTK_RESPONSE_CANCEL,
29+ "_Open", GTK_RESPONSE_ACCEPT,
30+ NULL);
31+ g_object_set (chooser,
32+ "local-only", FALSE,
33+ "select-multiple", TRUE,
34+ NULL);
35+
36+ res = gtk_dialog_run (GTK_DIALOG (chooser));
37+ if (res == GTK_RESPONSE_ACCEPT) {
38+ GSList *l;
39+
40+ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser));
41+ while (l) {
42+ play.uris = g_list_append (play.uris, l->data);
43+ l = g_slist_delete_link (l, l);
44+ }
45+ } else {
46+ return 0;
47+ }
48+ gtk_widget_destroy (chooser);
49 } else {
50 guint i;
51
52--
531.7.10.4
54
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
new file mode 100644
index 0000000000..9eb6adaf0c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
@@ -0,0 +1,10 @@
1[Desktop Entry]
2Name=Media Player
3Comment=Basic media plaer
4Icon=audio-player
5TryExec=gtk-play
6Exec=gtk-play
7StartupNotify=true
8Terminal=false
9Type=Application
10Categories=GTK;AudioVideo;
diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
new file mode 100644
index 0000000000..a7df526b82
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -0,0 +1,31 @@
1SUMMARY="GStreamer playback helper library and examples"
2
3LICENSE = "LGPL-2.0+"
4LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65"
5
6DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+3"
7
8SRC_URI = "git://github.com/sdroege/gst-player.git \
9 file://filechooser.patch \
10 file://gst-player.desktop"
11
12SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"
13
14S = "${WORKDIR}/git"
15
16inherit autotools gtk-doc lib_package pkgconfig
17
18do_configure_prepend() {
19 touch ${S}/ChangeLog
20}
21
22EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no"
23
24do_install_append() {
25 install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
26}
27
28FILES_${PN}-bin += "${datadir}/applications/*.desktop"
29
30RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback"
31RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta gstreamer1.0-plugins-good-meta gstreamer1.0-plugins-bad-meta gstreamer1.0-plugins-ugly-meta"