summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2015-03-19 10:53:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:03:49 +0000
commit577f9f3d4135b65ec364c41a5744f61240cf9579 (patch)
tree8a79acdad469b05d723c7cc7ed0a64bc6041c8dc /meta/recipes-multimedia
parentf4857dc64065fda9f20ada185b745ccb0c93b484 (diff)
downloadpoky-577f9f3d4135b65ec364c41a5744f61240cf9579.tar.gz
gst-player: Fix Pause/Play in GTK+ player
Backport a bug fix from upstream gst-player to make Pause and Play buttons work properly in gtk-play. [ YOCTO #7429 ] (From OE-Core rev: 026f512529e79ece2833340dd4cb6c29d42ca041) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch107
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player_git.bb1
2 files changed, 108 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch b/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
new file mode 100644
index 0000000000..783c42ad70
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player/Fix-pause-play.patch
@@ -0,0 +1,107 @@
1Fix pause/play
2
3The current player state is now notified via the state-changed signal,
4and in the GTK UI it was only used to keep track of the desired state.
5
6This is a backport of upstream commit 738479c7a0.
7
8Upstream-Status: Backport
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10
11---
12 gtk/gtk-play.c | 8 ++++++--
13 lib/gst/player/gstplayer.c | 12 ------------
14 lib/gst/player/gstplayer.h | 2 --
15 3 files changed, 6 insertions(+), 16 deletions(-)
16
17diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
18index 6e7a098..e2b605a 100644
19--- a/gtk/gtk-play.c
20+++ b/gtk/gtk-play.c
21@@ -34,6 +34,7 @@ typedef struct
22 GtkWidget *info_bar;
23 GtkWidget *volume_button;
24 gulong seekbar_value_changed_signal_id;
25+ gboolean playing;
26 } GtkPlay;
27
28 /* Compat stubs */
29@@ -118,12 +119,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
30 {
31 GtkWidget *image;
32
33- if (gst_player_is_playing (play->player)) {
34+ if (play->playing) {
35 gst_player_pause (play->player);
36 image =
37 gtk_image_new_from_icon_name ("media-playback-start",
38 GTK_ICON_SIZE_BUTTON);
39 gtk_button_set_image (GTK_BUTTON (play->play_pause_button), image);
40+ play->playing = FALSE;
41 } else {
42 gchar *title;
43
44@@ -136,6 +138,7 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play)
45 title = gst_player_get_uri (play->player);
46 set_title (play, title);
47 g_free (title);
48+ play->playing = TRUE;
49 }
50 }
51
52@@ -335,7 +338,7 @@ video_dimensions_changed_cb (GstPlayer * unused, gint width, gint height,
53 static void
54 eos_cb (GstPlayer * unused, GtkPlay * play)
55 {
56- if (gst_player_is_playing (play->player)) {
57+ if (play->playing) {
58 GList *next = NULL;
59 gchar *uri;
60
61@@ -452,6 +455,7 @@ main (gint argc, gchar ** argv)
62 }
63
64 play.player = gst_player_new ();
65+ play.playing = TRUE;
66
67 g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL);
68
69diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c
70index 069b284..78e7ba1 100644
71--- a/lib/gst/player/gstplayer.c
72+++ b/lib/gst/player/gstplayer.c
73@@ -1422,18 +1422,6 @@ gst_player_set_uri (GstPlayer * self, const gchar * val)
74 g_object_set (self, "uri", val, NULL);
75 }
76
77-gboolean
78-gst_player_is_playing (GstPlayer * self)
79-{
80- gboolean val;
81-
82- g_return_val_if_fail (GST_IS_PLAYER (self), FALSE);
83-
84- g_object_get (self, "is-playing", &val, NULL);
85-
86- return val;
87-}
88-
89 GstClockTime
90 gst_player_get_position (GstPlayer * self)
91 {
92diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h
93index 6933dd7..35fb5bb 100644
94--- a/lib/gst/player/gstplayer.h
95+++ b/lib/gst/player/gstplayer.h
96@@ -93,8 +93,6 @@ gchar * gst_player_get_uri (GstPlayer * player);
97 void gst_player_set_uri (GstPlayer * player,
98 const gchar * uri);
99
100-gboolean gst_player_is_playing (GstPlayer * player);
101-
102 GstClockTime gst_player_get_position (GstPlayer * player);
103 GstClockTime gst_player_get_duration (GstPlayer * player);
104
105--
1062.1.4
107
diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
index 3dde15111e..07224c00e3 100644
--- a/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -8,6 +8,7 @@ DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+"
8SRC_URI = "git://github.com/sdroege/gst-player.git \ 8SRC_URI = "git://github.com/sdroege/gst-player.git \
9 file://filechooser.patch \ 9 file://filechooser.patch \
10 file://gtk2.patch \ 10 file://gtk2.patch \
11 file://Fix-pause-play.patch \
11 file://gst-player.desktop" 12 file://gst-player.desktop"
12 13
13SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645" 14SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"