summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2017-04-28 14:54:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-29 11:17:23 +0100
commit1565a2491847370939b87f6fd0c281b7f317ab1c (patch)
treeef9a68c8fbea91511cf10216fb6c21dd2e7c2f1d /meta/recipes-multimedia
parentd7ec005904b456c62a226efd5c6931e81459052a (diff)
downloadpoky-1565a2491847370939b87f6fd0c281b7f317ab1c.tar.gz
gst-player: Disable visualizations as workaround
Audio playback in gtk-play is broken with vaapi because the visualizations do not work: disable visualizations as workaround. This should be reverted as soon as [YOCTO #11410] is fixed. (From OE-Core rev: 1092a8d4bc78a53f60ad0137aeb08b31853db9eb) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@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/0001-gtk-play-Disable-visualizations.patch59
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player_git.bb1
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch b/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch
new file mode 100644
index 0000000000..ea88120074
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch
@@ -0,0 +1,59 @@
1From 6cf42c468e93b0aaa171961e059bc3e2fb915889 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Fri, 28 Apr 2017 14:35:19 +0300
4Subject: [PATCH] gtk-play: Disable visualizations
5
6This is a workaround for [YOCTO #11410] (audio playback is broken in
7mediaplayer if vaapi is used). It disables visualizations and makes
8sure we clear the window (otherwise nothing does that and result is
9very ugly).
10
11This patch should be removed when 11410 is fixed.
12
13Upstream-Status: Inappropriate [bug workaround]
14Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
15---
16 gtk/gtk-play.c | 13 ++++++++++++-
17 1 file changed, 12 insertions(+), 1 deletion(-)
18
19diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
20index 8ae0fea..63b9bb0 100644
21--- a/gtk/gtk-play.c
22+++ b/gtk/gtk-play.c
23@@ -1401,6 +1401,15 @@ get_child_position (GtkOverlay * overlay, GtkWidget * widget,
24 return TRUE;
25 }
26
27+/* Hack to make sure something gets drawn if visualizations are disabled */
28+static gboolean
29+draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
30+{
31+ cairo_set_source_rgb (cr, 0, 0, 0);
32+ cairo_paint (cr);
33+ return FALSE;
34+}
35+
36 static void
37 create_ui (GtkPlay * play)
38 {
39@@ -1431,6 +1440,8 @@ create_ui (GtkPlay * play)
40 play->video_area = gtk_drawing_area_new ();
41 g_signal_connect (play->video_area, "realize",
42 G_CALLBACK (video_area_realize_cb), play);
43+ g_signal_connect (play->video_area, "draw",
44+ G_CALLBACK (draw_cb), NULL);
45 }
46 gtk_widget_set_events (play->video_area, GDK_EXPOSURE_MASK
47 | GDK_LEAVE_NOTIFY_MASK
48@@ -1753,7 +1764,7 @@ gtk_play_constructor (GType type, guint n_construct_params,
49
50 /* enable visualization (by default playbin uses goom) */
51 /* if visualization is enabled then use the first element */
52- gst_player_set_visualization_enabled (self->player, TRUE);
53+ gst_player_set_visualization_enabled (self->player, FALSE);
54
55 g_signal_connect (G_OBJECT (self), "show", G_CALLBACK (show_cb), NULL);
56
57--
582.1.4
59
diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
index ebc4ae8caf..cb12a464a4 100644
--- a/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -8,6 +8,7 @@ SRC_URI = "git://github.com/sdroege/gst-player.git \
8 file://filechooser.patch;apply=0 \ 8 file://filechooser.patch;apply=0 \
9 file://Fix-pause-play.patch;apply=0 \ 9 file://Fix-pause-play.patch;apply=0 \
10 file://Add-error-signal-emission-for-missing-plugins.patch;apply=0 \ 10 file://Add-error-signal-emission-for-missing-plugins.patch;apply=0 \
11 file://0001-gtk-play-Disable-visualizations.patch \
11 file://gst-player.desktop" 12 file://gst-player.desktop"
12 13
13SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb" 14SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"