summaryrefslogtreecommitdiff
path: root/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
diff options
context:
space:
mode:
authorMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-04-01 11:32:50 -0700
committerMatthew Breindel (Falcon) <falcon@lindenlab.com>2010-04-01 11:32:50 -0700
commit07ff392e8d12214dc23884a092204f00386109a9 (patch)
treea23e03269da7d99e9882531750d7c17e3e3db868 /indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
parent19c83c67c42305e41bff4b651975671d34a22b55 (diff)
parentbb4836f53d98d987a1702f970d4b853eaa529907 (diff)
Merge
Diffstat (limited to 'indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp')
-rw-r--r--indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
index a69da3ff5a..033c4ba2f3 100644
--- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
+++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
@@ -141,6 +141,7 @@ private:
// Very GStreamer-specific
GMainLoop *mPump; // event pump for this media
GstElement *mPlaybin;
+ GstElement *mVisualizer;
GstSLVideo *mVideoSink;
};
@@ -159,6 +160,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010(
mSeekDestination(0.0),
mPump ( NULL ),
mPlaybin ( NULL ),
+ mVisualizer ( NULL ),
mVideoSink ( NULL ),
mCommand ( COMMAND_NONE )
{
@@ -686,6 +688,33 @@ MediaPluginGStreamer010::load()
this);
llgst_object_unref (bus);
+ // get a visualizer element (bonus feature!)
+ char* vis_name = getenv("LL_GST_VIS_NAME");
+ if (!vis_name ||
+ (vis_name && std::string(vis_name)!="none"))
+ {
+ if (vis_name)
+ {
+ mVisualizer = llgst_element_factory_make (vis_name, "vis");
+ }
+ if (!mVisualizer)
+ {
+ mVisualizer = llgst_element_factory_make ("libvisual_jess", "vis");
+ if (!mVisualizer)
+ {
+ mVisualizer = llgst_element_factory_make ("goom", "vis");
+ if (!mVisualizer)
+ {
+ mVisualizer = llgst_element_factory_make ("libvisual_lv_scope", "vis");
+ if (!mVisualizer)
+ {
+ // That's okay, we don't NEED this.
+ }
+ }
+ }
+ }
+ }
+
if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) {
// instantiate a custom video sink
mVideoSink =
@@ -702,6 +731,11 @@ MediaPluginGStreamer010::load()
g_object_set(mPlaybin, "video-sink", mVideoSink, NULL);
}
+ if (mVisualizer)
+ {
+ g_object_set(mPlaybin, "vis-plugin", mVisualizer, NULL);
+ }
+
return true;
}
@@ -724,6 +758,12 @@ MediaPluginGStreamer010::unload ()
mPlaybin = NULL;
}
+ if (mVisualizer)
+ {
+ llgst_object_unref (GST_OBJECT (mVisualizer));
+ mVisualizer = NULL;
+ }
+
if (mPump)
{
g_main_loop_quit(mPump);