Discussion:
[Bug 775045] New: gtkglsink: re parenting the video widget into a different toplevel does not work
(too old to reply)
"GStreamer" (GNOME Bugzilla)
2016-11-24 20:03:10 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Bug ID: 775045
Summary: gtkglsink: re parenting the video widget into a
different toplevel does not work
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-bad
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

Created attachment 340711
--> https://bugzilla.gnome.org/attachment.cgi?id=340711&action=edit
Simple test case

Reparenting the video widget from gtkglsink to a different toplevel does not
work because the GdkGLContext is different and GtkGstGLWidget uses the old one.

This is needed to implement fullscreen for example.

Ideally GtkGstGLWidget should get the context in the realize event and free it
on unrealize if possible.

Attached a simple test case that toggles fullscreen mode on key release
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-11-25 14:41:13 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Juan Pablo Ugarte <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #340711|0 |1
is obsolete| |

--- Comment #1 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 340760
--> https://bugzilla.gnome.org/attachment.cgi?id=340760&action=edit
Test case using videotestsrc
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-11-25 15:13:31 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

--- Comment #2 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 340764
--> https://bugzilla.gnome.org/attachment.cgi?id=340764&action=edit
Small patch to use g_clear_pointer() macros
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-11-25 15:17:07 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Juan Pablo Ugarte <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #340765|none |needs-work
status| |

--- Comment #3 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 340765
--> https://bugzilla.gnome.org/attachment.cgi?id=340765&action=edit
WIP try to initialize GL context on realize event


After the second realize I get a bunch of

(a.out:13651): Gtk-WARNING **: fb setup not supported

bacause glCheckFramebufferStatusEXT() in gtk_gl_area_draw() does not return
GL_FRAMEBUFFER_COMPLETE_EXT
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-16 01:55:59 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Cosimo Cecchi <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-02-14 01:03:29 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|gst-plugins-bad |gst-plugins-good
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-10 21:48:06 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

--- Comment #8 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 371914
--> https://bugzilla.gnome.org/attachment.cgi?id=371914&action=edit
WIP: GstGLDisplay add context-removed signal and remove_context()
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-10 21:47:00 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Juan Pablo Ugarte <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #371869|needs-work |none
status| |
Attachment #371869|0 |1
is obsolete| |

--- Comment #7 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 371913
--> https://bugzilla.gnome.org/attachment.cgi?id=371913&action=edit
WIP: initialize GL context in create_context method

GtkGLArea create-context signal looks like a good place to initialize all the
GL wrappers objects.
This still does not fix all issues, but I just want to post it here to get some
feedback
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-10 13:34:52 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

--- Comment #6 from Juan Pablo Ugarte <***@gmail.com> ---
(In reply to Matthew Waters (ystreet00) from comment #5)
The other part: changing the display/context used by the pipeline requires
some thinking/design work as the GstContext machinery does not have support
for that.
The easiest thing I can come up with is to add a 'resource-destroyed'-like
signal on both GstGLDisplay and GstGLContext where on emission each user
attempts to retrieve a new GstGLDisplay/GstGLContext.
I havent looked at the code at all, but from a quick look at the API
I would add 'context-removed' signal and gst_gl_display_remove_context ()
function to GstGLDisplay.
For GstGLContext maybe we can get away with a weak reference or we can add
GtkWidget::destroy like signal if needed
::: ext/gtk/gtkgstglwidget.c
@@ +377,3 @@
+ if (!priv->other_context) {
+ GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+ gst_gtk_invoke_on_main ((GThreadFunc) _get_gl_context, gst_widget);
Aren't we always called on the main thread already from GtkWidget?
yeah! copy/paste left over
@@ +388,3 @@
+
+ if (priv->context)
+ retval = gst_gl_display_add_context (priv->display, priv->context);
retval isn't declared or used.
Ops, I tried to remove all the debug things but missed that one
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-09 18:59:23 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Juan Pablo Ugarte <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #340764|0 |1
is obsolete| |
Attachment #340765|needs-work |none
status| |
Attachment #340765|0 |1
is obsolete| |

--- Comment #4 from Juan Pablo Ugarte <***@gmail.com> ---
Created attachment 371869
--> https://bugzilla.gnome.org/attachment.cgi?id=371869&action=edit
WIP: initialize GL context on realize event

This patch makes going back to windowed mode work
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-05-10 01:47:19 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=775045

Matthew Waters (ystreet00) <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #371869|none |needs-work
status| |

--- Comment #5 from Matthew Waters (ystreet00) <***@gmail.com> ---
Review of attachment 371869:
--> (https://bugzilla.gnome.org/review?bug=775045&attachment=371869)

The other part: changing the display/context used by the pipeline requires some
thinking/design work as the GstContext machinery does not have support for
that.

The easiest thing I can come up with is to add a 'resource-destroyed'-like
signal on both GstGLDisplay and GstGLContext where on emission each user
attempts to retrieve a new GstGLDisplay/GstGLContext.

::: ext/gtk/gtkgstglwidget.c
@@ +377,3 @@
+ if (!priv->other_context) {
+ GTK_GST_BASE_WIDGET_UNLOCK (gst_widget);
+ gst_gtk_invoke_on_main ((GThreadFunc) _get_gl_context, gst_widget);

Aren't we always called on the main thread already from GtkWidget?

@@ +388,3 @@
+
+ if (priv->context)
+ retval = gst_gl_display_add_context (priv->display, priv->context);

retval isn't declared or used.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...