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 | |
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')
-rw-r--r-- | linden/indra/newview/lloverlaybar.cpp | 52 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia_streamingaudio.cpp | 22 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia_streamingaudio.h | 10 |
4 files changed, 30 insertions, 56 deletions
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index e903df7..e713e22 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "llagent.h" | 43 | #include "llagent.h" |
44 | #include "llbutton.h" | 44 | #include "llbutton.h" |
45 | #include "llchatbar.h" | 45 | #include "llchatbar.h" |
46 | #include "llfloaterchat.h" | 46 | //#include "llfloaterchat.h" |
47 | #include "llfocusmgr.h" | 47 | #include "llfocusmgr.h" |
48 | #include "llimview.h" | 48 | #include "llimview.h" |
49 | #include "llmediaremotectrl.h" | 49 | #include "llmediaremotectrl.h" |
@@ -75,60 +75,10 @@ LLOverlayBar *gOverlayBar = NULL; | |||
75 | 75 | ||
76 | extern S32 MENU_BAR_HEIGHT; | 76 | extern S32 MENU_BAR_HEIGHT; |
77 | 77 | ||
78 | //awfixme | ||
79 | /* | ||
80 | class LLTitleObserver | ||
81 | : public LLMediaObserver | ||
82 | { | ||
83 | public: | ||
84 | void init(std::string url); | ||
85 | *//*virtual*//* void onMediaTitleChange(const EventType& event_in); | ||
86 | private: | ||
87 | LLMediaBase* mMediaSource; | ||
88 | }; | ||
89 | |||
90 | static LLTitleObserver sTitleObserver; | ||
91 | |||
92 | static LLRegisterWidget<LLMediaRemoteCtrl> r("media_remote"); | ||
93 | |||
94 | void LLTitleObserver::init(std::string url) | ||
95 | { | ||
96 | |||
97 | if (!gAudiop) | ||
98 | { | ||
99 | return; | ||
100 | } | ||
101 | |||
102 | mMediaSource = gAudiop->getStreamMedia(); // LLViewerMedia::getSource(); | ||
103 | |||
104 | if ( mMediaSource ) | ||
105 | { | ||
106 | mMediaSource->addObserver(this); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | //virtual | ||
111 | void LLTitleObserver::onMediaTitleChange(const EventType& event_in) | ||
112 | { | ||
113 | if ( !gSavedSettings.getBOOL("ShowStreamTitle") ) | ||
114 | { | ||
115 | return; | ||
116 | } | ||
117 | |||
118 | LLChat chat; | ||
119 | //TODO: set this in XUI | ||
120 | std::string playing_msg = "Playing: " + event_in.getStringValue(); | ||
121 | chat.mText = playing_msg; | ||
122 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
123 | } | ||
124 | */ | ||
125 | |||
126 | // | 78 | // |
127 | // Functions | 79 | // Functions |
128 | // | 80 | // |
129 | 81 | ||
130 | |||
131 | |||
132 | void* LLOverlayBar::createMediaRemote(void* userdata) | 82 | void* LLOverlayBar::createMediaRemote(void* userdata) |
133 | { | 83 | { |
134 | LLOverlayBar *self = (LLOverlayBar*)userdata; | 84 | LLOverlayBar *self = (LLOverlayBar*)userdata; |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 237a967..64a2308 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -39,7 +39,7 @@ | |||
39 | #else | 39 | #else |
40 | # include <sys/stat.h> // mkdir() | 40 | # include <sys/stat.h> // mkdir() |
41 | #endif | 41 | #endif |
42 | 42 | #include "llpluginclassmediaowner.h" | |
43 | #include "llviewermedia_streamingaudio.h" | 43 | #include "llviewermedia_streamingaudio.h" |
44 | #include "llaudioengine.h" | 44 | #include "llaudioengine.h" |
45 | 45 | ||
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 | ||
diff --git a/linden/indra/newview/llviewermedia_streamingaudio.h b/linden/indra/newview/llviewermedia_streamingaudio.h index 270bab7..816e213 100644 --- a/linden/indra/newview/llviewermedia_streamingaudio.h +++ b/linden/indra/newview/llviewermedia_streamingaudio.h | |||
@@ -36,12 +36,13 @@ | |||
36 | 36 | ||
37 | 37 | ||
38 | #include "stdtypes.h" // from llcommon | 38 | #include "stdtypes.h" // from llcommon |
39 | |||
40 | #include "llstreamingaudio.h" | 39 | #include "llstreamingaudio.h" |
41 | 40 | ||
42 | class LLPluginClassMedia; | 41 | class LLPluginClassMedia; |
43 | 42 | ||
44 | class LLStreamingAudio_MediaPlugins : public LLStreamingAudioInterface | 43 | class LLStreamingAudio_MediaPlugins : |
44 | public LLStreamingAudioInterface, | ||
45 | public LLPluginClassMediaOwner | ||
45 | { | 46 | { |
46 | public: | 47 | public: |
47 | LLStreamingAudio_MediaPlugins(); | 48 | LLStreamingAudio_MediaPlugins(); |
@@ -56,14 +57,17 @@ class LLStreamingAudio_MediaPlugins : public LLStreamingAudioInterface | |||
56 | /*virtual*/ F32 getGain(); | 57 | /*virtual*/ F32 getGain(); |
57 | /*virtual*/ std::string getURL(); | 58 | /*virtual*/ std::string getURL(); |
58 | 59 | ||
60 | // inherited from LLPluginClassMediaOwner | ||
61 | /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); | ||
62 | |||
59 | private: | 63 | private: |
60 | LLPluginClassMedia* initializeMedia(const std::string& media_type); | 64 | LLPluginClassMedia* initializeMedia(const std::string& media_type); |
61 | 65 | ||
62 | LLPluginClassMedia *mMediaPlugin; | 66 | LLPluginClassMedia *mMediaPlugin; |
63 | |||
64 | std::string mURL; | 67 | std::string mURL; |
65 | F32 mGain; | 68 | F32 mGain; |
66 | }; | 69 | }; |
67 | 70 | ||
68 | 71 | ||
72 | |||
69 | #endif //LL_VIEWERMEDIA_STREAMINGAUDIO_H | 73 | #endif //LL_VIEWERMEDIA_STREAMINGAUDIO_H |