aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmedia')
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp37
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.h15
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc4
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamervidplug.cpp6
4 files changed, 13 insertions, 49 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 18afc45..bae8ad9 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -43,10 +43,6 @@ extern "C" {
43 43
44#include "llmediaimplgstreamervidplug.h" 44#include "llmediaimplgstreamervidplug.h"
45 45
46#ifdef LL_GST_SOUNDSINK
47#include "llmediaimplgstreamersndplug.h"
48#endif // LL_GST_SOUNDSINK
49
50#include "llmediaimplgstreamer_syms.h" 46#include "llmediaimplgstreamer_syms.h"
51 47
52#include "llerror.h" 48#include "llerror.h"
@@ -77,9 +73,6 @@ LLMediaImplGStreamer () :
77 mPlaybin ( NULL ), 73 mPlaybin ( NULL ),
78 mVideoSink ( NULL ), 74 mVideoSink ( NULL ),
79 mState( GST_STATE_NULL ) 75 mState( GST_STATE_NULL )
80#ifdef LL_GST_SOUNDSINK
81 ,mAudioSink ( NULL )
82#endif // LL_GST_SOUNDSINK
83{ 76{
84 LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL; 77 LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL;
85 mVolume = -1.0; // XXX Hack to make the vould change happend first time 78 mVolume = -1.0; // XXX Hack to make the vould change happend first time
@@ -115,21 +108,6 @@ LLMediaImplGStreamer () :
115 } 108 }
116 109
117 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); 110 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL);
118
119#ifdef LL_GST_SOUNDSINK
120 LL_DEBUGS("MediaManager") << "extrenal audio sink..." << LL_ENDL;
121 // instantiate and connect a custom audio sink
122 mAudioSink =
123 GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound"));
124 if (!mAudioSink)
125 {
126 LL_WARN("MediaImpl") << "Could not instantiate private-slsound element." << LL_ENDL;
127 // todo: cleanup.
128 return; // error
129 }
130
131 g_object_set(mPlaybin, "audio-sink", mAudioSink, NULL);
132#endif
133 } 111 }
134} 112}
135 113
@@ -210,9 +188,6 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data)
210 188
211 // Init our custom plugins - only really need do this once. 189 // Init our custom plugins - only really need do this once.
212 gst_slvideo_init_class(); 190 gst_slvideo_init_class();
213#if 0
214 gst_slsound_init_class();
215#endif
216 191
217 done_init = true; 192 done_init = true;
218 } 193 }
@@ -360,7 +335,6 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp
360 } 335 }
361 case GST_MESSAGE_TAG: 336 case GST_MESSAGE_TAG:
362 { 337 {
363#if 0
364 GstTagList *tag_list; 338 GstTagList *tag_list;
365 gchar *title; 339 gchar *title;
366 gchar *artist; 340 gchar *artist;
@@ -370,10 +344,9 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp
370 gboolean hazArtist = llgst_tag_list_get_string(tag_list, 344 gboolean hazArtist = llgst_tag_list_get_string(tag_list,
371 GST_TAG_ARTIST, &artist); 345 GST_TAG_ARTIST, &artist);
372 if(hazTitle) 346 if(hazTitle)
373 LL_INFOS("MediaInfo") << "Title is " << title << LL_ENDL; 347 LL_INFOS("MediaInfo") << "Title: " << title << LL_ENDL;
374 if(hazArtist) 348 if(hazArtist)
375 LL_INFOS("MediaInfo") << "Artist is " << artist << LL_ENDL; 349 LL_INFOS("MediaInfo") << "Artist: " << artist << LL_ENDL;
376#endif
377 break; 350 break;
378 } 351 }
379 case GST_MESSAGE_EOS: 352 case GST_MESSAGE_EOS:
@@ -412,9 +385,6 @@ bool LLMediaImplGStreamer::navigateTo (const std::string urlIn)
412 << LL_ENDL; 385 << LL_ENDL;
413 386
414 if (NULL == mPump 387 if (NULL == mPump
415#ifdef LL_GST_SOUNDSINK
416 || NULL == mAudioSink
417#endif
418 || NULL == mPlaybin) 388 || NULL == mPlaybin)
419 { 389 {
420 return false; 390 return false;
@@ -479,9 +449,6 @@ bool LLMediaImplGStreamer::updateMedia()
479 449
480 // sanity check 450 // sanity check
481 if (NULL == mPump 451 if (NULL == mPump
482#ifdef LL_GST_SOUNDSINK
483 || NULL == mAudioSink
484#endif
485 || NULL == mPlaybin) 452 || NULL == mPlaybin)
486 { 453 {
487#ifdef LL_GST_REPORT_STATE_CHANGES 454#ifdef LL_GST_REPORT_STATE_CHANGES
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h
index 4b9353b..5b493ad 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer.h
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33// header guard 33// header guard
34///#ifndef llmediaimplgstreamer_h 34#ifndef llmediaimplgstreamer_h
35#define llmediaimplgstreamer_h 35#define llmediaimplgstreamer_h
36 36
37#include "llmediaimplcommon.h" 37#include "llmediaimplcommon.h"
@@ -42,14 +42,12 @@
42extern "C" { 42extern "C" {
43#include <stdio.h> 43#include <stdio.h>
44#include <gst/gst.h> 44#include <gst/gst.h>
45#include <apr_pools.h> 45
46#include <apr_dso.h> 46#include "apr_pools.h"
47#include "apr_dso.h"
47} 48}
48 49
49#include "llmediaimplgstreamervidplug.h" 50#include "llmediaimplgstreamervidplug.h"
50#ifdef LL_GST_SOUNDSINK
51#include "llmediaimplgstreamersndplug.h"
52#endif // LL_GST_SOUNDSINK
53 51
54class LLMediaManagerData; 52class LLMediaManagerData;
55class LLMediaImplMaker; 53class LLMediaImplMaker;
@@ -100,9 +98,6 @@ class LLMediaImplGStreamer:
100 GstElement *mPlaybin; 98 GstElement *mPlaybin;
101 GstSLVideo *mVideoSink; 99 GstSLVideo *mVideoSink;
102 GstState mState; 100 GstState mState;
103#ifdef LL_GST_SOUNDSINK
104 GstSLSound *mAudioSink;
105#endif // LL_GST_SOUNDSINK
106 GstState getState() const { return mState; } 101 GstState getState() const { return mState; }
107}; 102};
108 103
@@ -132,4 +127,4 @@ public:
132 127
133///#endif // LL_GSTREAMER_ENABLED 128///#endif // LL_GSTREAMER_ENABLED
134 129
135///#endif // llmediaimplgstreamer_h 130#endif // llmediaimplgstreamer_h
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
index 08ba6df..e17a7a0 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
@@ -40,3 +40,7 @@ LL_GST_SYM(true, gst_element_seek, bool, GstElement *, gdouble, GstFormat, GstSe
40LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled); 40LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled);
41LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent); 41LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent);
42LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug); 42LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug);
43
44//aw tag infos (Artist, Title, ...tbc...)
45LL_GST_SYM(true, gst_message_parse_tag, void, GstMessage *message, GstTagList **tag_list);
46LL_GST_SYM(true, gst_tag_list_get_string, gboolean, const GstTagList *list, const gchar *tag, gchar **value);
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
index 892c50d..c95ef36 100644
--- a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
@@ -68,10 +68,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE (
68 GST_STATIC_CAPS (SLV_ALLCAPS) 68 GST_STATIC_CAPS (SLV_ALLCAPS)
69 ); 69 );
70 70
71GST_BOILERPLATE (GstSLVideo, 71GST_BOILERPLATE (GstSLVideo, gst_slvideo, GstVideoSink,
72 gst_slvideo, 72 GST_TYPE_VIDEO_SINK);
73 GstVideoSink,
74 GST_TYPE_VIDEO_SINK);
75 73
76static void gst_slvideo_set_property (GObject * object, guint prop_id, 74static void gst_slvideo_set_property (GObject * object, guint prop_id,
77 const GValue * value, 75 const GValue * value,