gstgtk: Allow doing gst-inspect-1.0 on these elements
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 11 Jun 2015 16:10:23 +0000 (12:10 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 11 Jun 2015 16:41:49 +0000 (12:41 -0400)
commit5c6050f8495204eee48b8a6b7e5bee3b9e420ab6
tree16f2d68473731211a1e9f2a781ae9eb96b2ffd59
parent4cef5787c8af5c5c9466d752b89184edcab8c1dd
gstgtk: Allow doing gst-inspect-1.0 on these elements

This patch allow going gst-inspect-1.0 on these elements removing
ugly crash that was previously occurring. The method consist of
making the widget creation as lazy as possible. This way we don't
endup doing gtk_init() before the application. We also ref_sink()
the widget, so we don't crash if the parent widget is discarded,
and cleanly error out with GL if the widget has no parent window,
because calling gtk_widget_realized() can only be done if the widget
has been parented to a window).
ext/gtk/gstgtkglsink.c
ext/gtk/gstgtksink.c