summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-15 12:53:56 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-15 12:53:56 -0400
commit44f65edd68699ecf3f692351b3a601b71585bf6e (patch)
tree04cb09c82cb94d323192993bc53e31412de980e7 /indra/media_plugins
parent961656863a5e50e5f80e1e316811b884dd8a949f (diff)
parentda078d9a35e256a59652f6ed545b3cb09f384bb0 (diff)
merge
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/gstreamer010/CMakeLists.txt6
-rw-r--r--indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp28
2 files changed, 24 insertions, 10 deletions
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
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