From f9f6f1958db0fcaabf78f61ab86f9e533bb9cc02 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 5 Feb 2010 09:01:58 +0000 Subject: EXT-4290 [Flash] On linux, youtube videos don't play unless its getting a mouse move event This should be a lot better now. But still not good overall. Performance is now just bad instead of intolerable. --- indra/llwindow/llwindowsdl.cpp | 2 +- indra/media_plugins/webkit/CMakeLists.txt | 11 +++++++++- indra/media_plugins/webkit/media_plugin_webkit.cpp | 24 ++++++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index bfdf1147a1..f9c3694459 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1617,7 +1617,7 @@ void LLWindowSDL::processMiscNativeEvents() pump_timer.setTimerExpirySec(1.0f / 15.0f); do { // Always do at least one non-blocking pump - gtk_main_iteration_do(0); + gtk_main_iteration_do(FALSE); } while (gtk_events_pending() && !pump_timer.hasExpired()); diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 5bccd589d8..812760a116 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -9,6 +9,7 @@ include(LLPlugin) include(LLMath) include(LLRender) include(LLWindow) +include(UI) include(Linking) include(PluginAPI) include(MediaPluginBase) @@ -38,7 +39,7 @@ add_library(media_plugin_webkit ${media_plugin_webkit_SOURCE_FILES} ) -target_link_libraries(media_plugin_webkit +set(media_plugin_webkit_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} ${LLCOMMON_LIBRARIES} @@ -46,6 +47,14 @@ target_link_libraries(media_plugin_webkit ${PLUGIN_API_WINDOWS_LIBRARIES} ) +if (LINUX) + list(APPEND media_plugin_webkit_LINK_LIBRARIES + ${UI_LIBRARIES} # for glib/GTK + ) +endif (LINUX) + +target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES}) + add_dependencies(media_plugin_webkit ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 3c24b4ed22..b607d2f66a 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -43,15 +43,21 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" +#if LL_LINUX +extern "C" { +# include +} +#endif // LL_LINUX + #if LL_WINDOWS -#include +# include #else -#include -#include +# include +# include #endif #if LL_WINDOWS - // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below + // *NOTE:Mani - This captures the module handle for the dll. This is used below // to get the path to this dll for webkit initialization. // I don't know how/if this can be done with apr... namespace { HMODULE gModuleHandle;}; @@ -112,6 +118,16 @@ private: // void update(int milliseconds) { +#if LL_LINUX + // pump glib generously, as Linux browser plugins are on the + // glib main loop, even if the browser itself isn't - ugh + //*TODO: shouldn't this be transparent if Qt was compiled with + // glib mainloop integration? investigate. + GMainContext *mainc = g_main_context_default(); + while(g_main_context_iteration(mainc, FALSE)); +#endif // LL_LINUX + + // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); checkEditState(); -- cgit v1.2.3 From 456bbdfa2f3471896f6981e70a9daa56dae51d18 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 5 Feb 2010 09:03:09 +0000 Subject: fix hook whine. --- indra/media_plugins/webkit/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 812760a116..4512c22b5d 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -88,4 +88,5 @@ if (DARWIN) DEPENDS media_plugin_webkit ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libllqtwebkit.dylib ) -endif (DARWIN) \ No newline at end of file +endif (DARWIN) + -- cgit v1.2.3