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)
commitb14fea7fb8537bcd188a708ed8a36e0fbcc81955
treea92e3b9f8c1c704a1d7115825f0c604fc3314f60
parente2ce1eff36cb6c0c5fde6fc13ce57af3c89fa117
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