aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia/llmediaimplgstreamer.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llmedia/llmediaimplgstreamer.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llmedia/llmediaimplgstreamer.cpp')
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 5bf30d9..51a5bca 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -235,10 +235,11 @@ static char* get_gst_state_name(GstState state)
235} 235}
236#endif // LL_GST_REPORT_STATE_CHANGES 236#endif // LL_GST_REPORT_STATE_CHANGES
237 237
238static gboolean 238//static
239bus_callback (GstBus *bus, 239gboolean
240 GstMessage *message, 240LLMediaImplGStreamer::bus_callback (GstBus *bus,
241 gpointer data) 241 GstMessage *message,
242 gpointer data)
242{ 243{
243 if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_STATE_CHANGED && 244 if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_STATE_CHANGED &&
244 GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING) 245 GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING)
@@ -612,6 +613,27 @@ getMediaData ()
612// virtual 613// virtual
613bool 614bool
614LLMediaImplGStreamer:: 615LLMediaImplGStreamer::
616seek( double time )
617{
618 bool success = false;
619 if (mPlaybin)
620 {
621 success = llgst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME,
622 GstSeekFlags(GST_SEEK_FLAG_FLUSH |
623 GST_SEEK_FLAG_KEY_UNIT),
624 GST_SEEK_TYPE_SET, gint64(time*1000000000.0F),
625 GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
626 }
627 DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d",
628 float(time), int(success));
629 return success;
630}
631
632
633///////////////////////////////////////////////////////////////////////////////
634// virtual
635bool
636LLMediaImplGStreamer::
615setVolume(float volume) 637setVolume(float volume)
616{ 638{
617 mVolume = volume; 639 mVolume = volume;