summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-Disable-visualizations.patch59
1 files changed, 59 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