summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gst-player
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-03-02 11:41:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-02 22:05:35 +0000
commit03a357765f3471030e327019375e122cb8dc2ec2 (patch)
treea027beebd99707a2fefb04e6644213c2c571d1db /meta/recipes-multimedia/gstreamer/gst-player
parent3fb3030f3237e145296a3cbf864fa7423991eb22 (diff)
downloadpoky-03a357765f3471030e327019375e122cb8dc2ec2.tar.gz
gst-player: port to GTK+ 2
Whilst Sato still uses GTK+ 2 we don't want the overhead of building both GTK+ 2 and GKT+ 3. Luckily gtk-play is a simple application and it's just a small patch away from building with GTK+ 2. When Sato is ported to GTK+ 3 (the mythical Shuku proposal) this patch can be removed. (From OE-Core rev: 708b6793e67fa44c335af83af51f8da36f3f68ca) 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/gst-player')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch b/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
new file mode 100644
index 0000000000..2cd18bbc95
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
@@ -0,0 +1,71 @@
1As the rest of Sato is GTK+ 2, patch gtk-play to use GTK+ 2. When the rest of
2Sato has been ported to GTK+ 3 this patch can be dropped.
3
4Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7
8diff --git a/configure.ac b/configure.ac
9index b8af13b..90ab74c 100644
10--- a/configure.ac
11+++ b/configure.ac
12@@ -60,7 +60,7 @@ AC_SUBST(GLIB_PREFIX)
13 GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-1.0`"
14 AC_SUBST(GST_PREFIX)
15
16-PKG_CHECK_MODULES(GTK, [gtk+-3.0], [have_gtk="yes"], [have_gtk="no"])
17+PKG_CHECK_MODULES(GTK, [gtk+-2.0], [have_gtk="yes"], [have_gtk="no"])
18 AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" != "xno")
19
20 GOBJECT_INTROSPECTION_CHECK([1.31.1])
21diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
22index f015077..954d6fb 100644
23--- a/gtk/gtk-play.c
24+++ b/gtk/gtk-play.c
25@@ -34,6 +34,46 @@ typedef struct
26 gulong seekbar_value_changed_signal_id;
27 } GtkPlay;
28
29+/* Compat stubs */
30+GtkWidget *
31+gtk_box_new (GtkOrientation orientation,
32+ gint spacing)
33+{
34+ switch (orientation) {
35+ case GTK_ORIENTATION_HORIZONTAL:
36+ return gtk_hbox_new (FALSE, spacing);
37+ case GTK_ORIENTATION_VERTICAL:
38+ return gtk_vbox_new (FALSE, spacing);
39+ }
40+}
41+
42+GtkWidget*
43+gtk_button_new_from_icon_name (const gchar *icon_name,
44+ GtkIconSize size)
45+{
46+ GtkWidget *button;
47+ GtkWidget *image;
48+
49+ image = gtk_image_new_from_icon_name (icon_name, size);
50+ button = g_object_new (GTK_TYPE_BUTTON,
51+ "image", image,
52+ NULL);
53+ return button;
54+}
55+
56+GtkWidget *
57+gtk_scale_new_with_range (GtkOrientation orientation,
58+ gdouble min,
59+ gdouble max,
60+ gdouble step)
61+{
62+ switch (orientation) {
63+ case GTK_ORIENTATION_HORIZONTAL:
64+ return gtk_hscale_new_with_range (min, max, step);
65+ case GTK_ORIENTATION_VERTICAL:
66+ return gtk_vscale_new_with_range (min, max, step);
67+ }
68+}
69
70 static void
71 set_title (GtkPlay * play, const gchar * title)