From e79b9d9bab9c18c05cccbff1ae5869377b303560 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sun, 13 Jun 2010 12:36:02 +0100 Subject: SNOW-541 PARTIAL GSTREAMER fail to load (slplugin?) Robustify the plugin a bunch more, and turn off a dodgy-and-unused visualization feature. (transplanted from 43273f751dac21d53dba83a90d7f9e057865f789) --- .../gstreamer010/media_plugin_gstreamer010.cpp | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'indra/media_plugins') diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 033c4ba2f3..e6d2ad3edc 100644 --- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -544,8 +544,12 @@ MediaPluginGStreamer010::pause() { DEBUGMSG("pausing media..."); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); + return true; + } + return false; } bool @@ -553,8 +557,12 @@ MediaPluginGStreamer010::stop() { DEBUGMSG("stopping media..."); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_READY); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_READY); + return true; + } + return false; } bool @@ -564,8 +572,12 @@ MediaPluginGStreamer010::play(double rate) DEBUGMSG("playing media... rate=%f", rate); // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); - return true; + if (mDoneInit && mPlaybin) + { + llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); + return true; + } + return false; } bool @@ -608,7 +620,7 @@ bool MediaPluginGStreamer010::getTimePos(double &sec_out) { bool got_position = false; - if (mPlaybin) + if (mDoneInit && mPlaybin) { gint64 pos; GstFormat timefmt = GST_FORMAT_TIME; @@ -688,6 +700,7 @@ MediaPluginGStreamer010::load() this); llgst_object_unref (bus); +#if 0 // not quite stable/correct yet // get a visualizer element (bonus feature!) char* vis_name = getenv("LL_GST_VIS_NAME"); if (!vis_name || @@ -714,6 +727,7 @@ MediaPluginGStreamer010::load() } } } +#endif if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { // instantiate a custom video sink -- cgit v1.2.3 From 2fc77b8ee8184fe10c9f4da6ad79d80e89dc8a6b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 15 Jun 2010 13:13:24 +0100 Subject: VWR-19683 llmediaimplgstreamervidplug gcc 4.4 build errors --- indra/media_plugins/gstreamer010/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/media_plugins') diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 3b73e04786..9f0ff654fc 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -42,12 +42,12 @@ set(media_plugin_gstreamer010_HEADER_FILES llmediaimplgstreamertriviallogging.h ) -if (${CXX_VERSION_NUMBER} MATCHES "4[23].") +if (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") # Work around a bad interaction between broken gstreamer headers and - # g++ 4.3's increased strictness. + # g++ >= 4.2's increased strictness. set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES COMPILE_FLAGS -Wno-write-strings) -endif (${CXX_VERSION_NUMBER} MATCHES "4[23].") +endif (${CXX_VERSION_NUMBER} MATCHES "4[23456789].") add_library(media_plugin_gstreamer010 SHARED -- cgit v1.2.3