-// GstElement* videosink = gst_gconf_get_default_video_sink();
-//#else
- GstElement* videosink = gst_element_factory_make ("xvimagesink", "videosink");
- if ( !GST_IS_OBJECT(videosink) )
- videosink = gst_element_factory_make ("ximagesink", "videosink");
-//#endif
- wxASSERT( GST_IS_X_OVERLAY(videosink) );
- if ( ! GST_IS_X_OVERLAY(videosink) )
- return false;
+ //if synthisis (?) file not found, it
+ //spits out a warning and uses ximagesink
+ wxDynamicLibrary gstgconf;
+ if(gstgconf.Load(gstgconf.CanonicalizeName(wxT("gstgconf-0.8"))))
+ {
+ typedef GstElement* (*LPgst_gconf_get_default_video_sink) (void);
+ LPgst_gconf_get_default_video_sink pGst_gconf_get_default_video_sink =
+ (LPgst_gconf_get_default_video_sink)
+ gstgconf.GetSymbol(wxT("gst_gconf_get_default_video_sink"));
+
+ if (pGst_gconf_get_default_video_sink)
+ {
+ videosink = (*pGst_gconf_get_default_video_sink) ();
+ wxASSERT( GST_IS_BIN(videosink) );
+ overlay = gst_bin_get_by_interface (GST_BIN (videosink),
+ GST_TYPE_X_OVERLAY);
+ }
+
+ gstgconf.Detach();
+ }
+
+ if ( ! GST_IS_X_OVERLAY(overlay) )
+ {
+#endif
+ videosink = gst_element_factory_make ("xvimagesink", "videosink");
+ if ( !GST_IS_OBJECT(videosink) )
+ videosink = gst_element_factory_make ("ximagesink", "videosink");
+
+ overlay = videosink;
+
+ wxASSERT( GST_IS_X_OVERLAY(overlay) );
+ if ( ! GST_IS_X_OVERLAY(overlay) )
+ return false;
+#if defined(__WXGTK__) && wxUSE_DYNLIB_CLASS
+ }
+#endif