diff options
author | Armin Weatherwax | 2010-07-10 14:35:58 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:47:28 +0200 |
commit | f41c6363087f95ce5f7d99385e455d7e0105d883 (patch) | |
tree | 7574f66a2e8123610588e8b66f2e444850163801 /linden/indra/newview/llviewermedia_streamingaudio.cpp | |
parent | Fixed plugin compile issues on windows (diff) | |
download | meta-impy-f41c6363087f95ce5f7d99385e455d7e0105d883.zip meta-impy-f41c6363087f95ce5f7d99385e455d7e0105d883.tar.gz meta-impy-f41c6363087f95ce5f7d99385e455d7e0105d883.tar.bz2 meta-impy-f41c6363087f95ce5f7d99385e455d7e0105d883.tar.xz |
Imprudence style gstreamer plugin (remove llgst, syms and such)
Diffstat (limited to 'linden/indra/newview/llviewermedia_streamingaudio.cpp')
-rw-r--r-- | linden/indra/newview/llviewermedia_streamingaudio.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/linden/indra/newview/llviewermedia_streamingaudio.cpp b/linden/indra/newview/llviewermedia_streamingaudio.cpp index 06946da..575dbc8 100644 --- a/linden/indra/newview/llviewermedia_streamingaudio.cpp +++ b/linden/indra/newview/llviewermedia_streamingaudio.cpp | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "linden_common.h" | 36 | #include "linden_common.h" |
37 | #include "llpluginclassmedia.h" | 37 | #include "llpluginclassmedia.h" |
38 | #include "llviewermedia.h" | 38 | #include "llviewermedia.h" |
39 | #include "llviewercontrol.h" | ||
39 | 40 | ||
40 | #include "llviewermedia_streamingaudio.h" | 41 | #include "llviewermedia_streamingaudio.h" |
41 | 42 | ||
@@ -43,6 +44,8 @@ | |||
43 | #include "llvfs.h" | 44 | #include "llvfs.h" |
44 | #include "lldir.h" | 45 | #include "lldir.h" |
45 | 46 | ||
47 | #include "llchat.h" | ||
48 | #include "llfloaterchat.h" | ||
46 | 49 | ||
47 | LLStreamingAudio_MediaPlugins::LLStreamingAudio_MediaPlugins() : | 50 | LLStreamingAudio_MediaPlugins::LLStreamingAudio_MediaPlugins() : |
48 | mMediaPlugin(NULL), | 51 | mMediaPlugin(NULL), |
@@ -153,9 +156,26 @@ std::string LLStreamingAudio_MediaPlugins::getURL() | |||
153 | return mURL; | 156 | return mURL; |
154 | } | 157 | } |
155 | 158 | ||
159 | void LLStreamingAudio_MediaPlugins::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) | ||
160 | { | ||
161 | if (event == MEDIA_EVENT_NAME_CHANGED) | ||
162 | { | ||
163 | std::string title = self->getMediaName(); | ||
164 | if (!title.empty() && gSavedSettings.getBOOL("ShowStreamTitle")) | ||
165 | { | ||
166 | //llinfos << "Playing: " << title << llendl; | ||
167 | LLChat chat; | ||
168 | //TODO: set this in XUI | ||
169 | std::string playing_msg = "Playing: " + title; | ||
170 | chat.mText = playing_msg; | ||
171 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
172 | } | ||
173 | } | ||
174 | } | ||
175 | |||
156 | LLPluginClassMedia* LLStreamingAudio_MediaPlugins::initializeMedia(const std::string& media_type) | 176 | LLPluginClassMedia* LLStreamingAudio_MediaPlugins::initializeMedia(const std::string& media_type) |
157 | { | 177 | { |
158 | LLPluginClassMediaOwner* owner = NULL; | 178 | LLPluginClassMediaOwner* owner = this; |
159 | S32 default_size = 1; // audio-only - be minimal, doesn't matter | 179 | S32 default_size = 1; // audio-only - be minimal, doesn't matter |
160 | LLPluginClassMedia* media_source = LLViewerMediaImpl::newSourceFromMediaType(media_type, owner, default_size, default_size); | 180 | LLPluginClassMedia* media_source = LLViewerMediaImpl::newSourceFromMediaType(media_type, owner, default_size, default_size); |
161 | 181 | ||