X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b286fd733ea1dedce33b62173c0cfc2c92a10e6b..eb86e7755ec03b1bc398dabad5771ca3fa98adb0:/src/unix/mediactrl.cpp diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 81c9c35ba3..01a553416f 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -145,8 +145,10 @@ # define DEBUG_MAIN_THREAD # endif // Debug +#ifndef __WXGTK20__ extern void wxapp_install_idle_handler(); extern bool g_isIdle; +#endif extern bool g_mainThreadLocked; #endif // wxGTK @@ -166,7 +168,7 @@ class WXDLLIMPEXP_MEDIA public: wxGStreamerMediaBackend(); - ~wxGStreamerMediaBackend(); + virtual ~wxGStreamerMediaBackend(); virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, wxWindowID id, @@ -323,8 +325,10 @@ static gint gtk_window_realize_callback(GtkWidget* theWidget, { DEBUG_MAIN_THREAD // TODO: Is this neccessary? +#ifndef __WXGTK20__ if (g_isIdle) // FIXME: Why is needed? For wxYield? ?? wxapp_install_idle_handler(); +#endif wxYield(); // FIXME: RN: X Server gets an error/crash if I don't do // this or a messagebox beforehand?!?!?? @@ -1236,6 +1240,9 @@ bool wxGStreamerMediaBackend::DoLoad(const wxString& locstring) return false; } + // free current media resources + gst_element_set_state (m_playbin, GST_STATE_NULL); + // Make sure the passed URI is valid and tell playbin to load it // non-file uris are encoded wxASSERT(gst_uri_protocol_is_valid("file"));