<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div><br></div><p>Hi,<br></p><br><div class="moz-cite-prefix">On 07/24/2018 06:47 PM, Marc-André
Lureau wrote:<br></div><blockquote cite="mid:CAJ+F1CJaXaBeNj45Q9A50sT_D32LzgdMc4=1hzSnhF45C5aGgQ@mail.gmail.com"><pre>Hi
On Sun, Mar 11, 2018 at 10:44 AM, Snir Sheriber <a class="moz-txt-link-rfc2396E" href="mailto:ssheribe@redhat.com" target="_blank"><ssheribe@redhat.com></a> wrote:
</pre><blockquote><pre>Currently when gstreamer is used to decode a full-screen</pre></blockquote></blockquote></blockquote><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><blockquote cite="mid:CAJ+F1CJaXaBeNj45Q9A50sT_D32LzgdMc4=1hzSnhF45C5aGgQ@mail.gmail.com"><blockquote><pre>
...</pre></blockquote></blockquote></blockquote><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><blockquote cite="mid:CAJ+F1CJaXaBeNj45Q9A50sT_D32LzgdMc4=1hzSnhF45C5aGgQ@mail.gmail.com"><blockquote><pre>
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 1e7add4..73a77b7 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -612,6 +612,29 @@ G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif
+static void
+gst_area_realize(GtkGLArea *area, gpointer user_data)
+{
+//TODO: needs rework, currently works only under X
+#ifdef GDK_WINDOWING_X11
+ SpiceDisplay *display = SPICE_DISPLAY(user_data);
+ SpiceDisplayPrivate *d = display->priv;
+ GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(display));
+
+ if (window) {
+#if GTK_CHECK_VERSION(2,18,0)
+ if (!gdk_window_ensure_native (window)) {
+ g_warning("Couldn't create native window needed for GstVideoOverlay!");
+ return;
+ }
+#endif
+ g_object_set(G_OBJECT (d->display),
+ "handle", GDK_WINDOW_XID(window),
+ NULL);
+ }
+#endif
+}
+
static void
drawing_area_realize(GtkWidget *area, gpointer user_data)
{
@@ -660,6 +683,13 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif
+
+ area = gtk_drawing_area_new();
+ g_object_connect(area,
+ "signal::realize", gst_area_realize, display,
+ NULL);
+ gtk_stack_add_named(d->stack, area, "gst-area");
</pre></blockquote><pre>Was there a good reason to use a seperate drawing area rather than the
existing one?</pre></blockquote><br>
There were some reasons for this, iirc there was an issue with the
signals<br>
that was needed to be disabled to avoid interference with the
drawings (i<br>
had a version where it uses the same drawing area but eventually it
was<br>
dropped) and also at first i was trying both gl-area and
drawing-area so it was<br>
easier to switch.<br>
(Also please notice that this patch is not the recent version which
was pushed)<br></blockquote><div>I think the "there were some reasons" is an indication that a comment in<br></div><div>the code with the reason would be good.<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><blockquote cite="mid:CAJ+F1CJaXaBeNj45Q9A50sT_D32LzgdMc4=1hzSnhF45C5aGgQ@mail.gmail.com"><pre>Is there a simple way to test the "streaming mode"? A test case like
server/tests/test-display-streaming would be great.</pre></blockquote><br>
Could be tested by using spice-streaming-agent that streams mjpeg to
a client that was<br>
built with disabled builtin_mjpeg (so it will use the
spice-gst-decoder)<br>
or<br>
By using spice-streaming-agent that streams h264/vp8 video stream
using the gst-plugin<br>
which was recently sent to ML and it is still not pushed upstream. <br><br>
Currently I'm not aware to any similar\other test option that is
available upstream.<br><br>
Snir.<br></blockquote><div>Tests are always great. I don't think we really need all these system settings.<br></div><div>But that would be the target of this/these tests? Run into a CI? Manually testing?<br></div><div>I think gstreamer and video output are used here, the patch is supposed to optimize<br></div><div>the rendering part and the full pipeline. Also depends on codec and plugins installed<br></div><div>(although in a CI we can force to have some plugins installed, but still hard to get<br></div><div>a display server... or a vncserver is enough?)<br></div><div><br></div><div>Frediano<br></div><div><br></div></div></body></html>