Merge branch 'Moap' of git://github.com/Shyotl/SingularityViewer into VoiceUpdate
Conflicts: indra/newview/llfloateractivespeakers.h - llparticipantlist.h got changed from a panel to a layoutpanel indra/newview/lloverlaybar.cpp - Silly conflict, I change one line, Shyotl changes the next two. Compile fixies: indra/newview/llavataractions.cpp needed to include llnotifications.h indra/newview/llvoicechannel.cpp needed to include llnotifications.h
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llpluginclassmedia.h"
|
||||
#include "llpluginclassmediaowner.h"
|
||||
#include "llviewermedia.h"
|
||||
|
||||
#include "llviewermedia_streamingaudio.h"
|
||||
@@ -63,18 +64,18 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
|
||||
if (!mMediaPlugin) // lazy-init the underlying media plugin
|
||||
{
|
||||
mMediaPlugin = initializeMedia("audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis.
|
||||
llinfos << "mMediaPlugin is now " << mMediaPlugin << llendl;
|
||||
llinfos << "streaming audio mMediaPlugin is now " << mMediaPlugin << llendl;
|
||||
}
|
||||
|
||||
if(!mMediaPlugin)
|
||||
return;
|
||||
|
||||
|
||||
if (!url.empty()) {
|
||||
llinfos << "Starting internet stream: " << url << llendl;
|
||||
mURL = url;
|
||||
mMediaPlugin->loadURI ( url );
|
||||
mMediaPlugin->start();
|
||||
llinfos << "Playing....." << llendl;
|
||||
llinfos << "Playing stream..." << llendl;
|
||||
} else {
|
||||
llinfos << "setting stream to NULL"<< llendl;
|
||||
mURL.clear();
|
||||
@@ -84,11 +85,9 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
|
||||
|
||||
void LLStreamingAudio_MediaPlugins::stop()
|
||||
{
|
||||
llinfos << "entered LLStreamingAudio_MediaPlugins::stop()" << llendl;
|
||||
|
||||
llinfos << "Stopping internet stream." << llendl;
|
||||
if(mMediaPlugin)
|
||||
{
|
||||
llinfos << "Stopping internet stream: " << mURL << llendl;
|
||||
mMediaPlugin->stop();
|
||||
}
|
||||
|
||||
@@ -102,10 +101,12 @@ void LLStreamingAudio_MediaPlugins::pause(int pause)
|
||||
|
||||
if(pause)
|
||||
{
|
||||
llinfos << "Pausing internet stream." << llendl;
|
||||
mMediaPlugin->pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Unpausing internet stream." << llendl;
|
||||
mMediaPlugin->start();
|
||||
}
|
||||
}
|
||||
@@ -119,20 +120,21 @@ void LLStreamingAudio_MediaPlugins::update()
|
||||
int LLStreamingAudio_MediaPlugins::isPlaying()
|
||||
{
|
||||
if (!mMediaPlugin)
|
||||
return 0;
|
||||
return 0; // stopped
|
||||
|
||||
// *TODO: can probably do better than this
|
||||
if (mMediaPlugin->isPluginRunning())
|
||||
{
|
||||
return 1; // Active and playing
|
||||
}
|
||||
LLPluginClassMediaOwner::EMediaStatus status =
|
||||
mMediaPlugin->getStatus();
|
||||
|
||||
if (mMediaPlugin->isPluginExited())
|
||||
switch (status)
|
||||
{
|
||||
case LLPluginClassMediaOwner::MEDIA_LOADING: // but not MEDIA_LOADED
|
||||
case LLPluginClassMediaOwner::MEDIA_PLAYING:
|
||||
return 1; // Active and playing
|
||||
case LLPluginClassMediaOwner::MEDIA_PAUSED:
|
||||
return 2; // paused
|
||||
default:
|
||||
return 0; // stopped
|
||||
}
|
||||
|
||||
return 2; // paused
|
||||
}
|
||||
|
||||
void LLStreamingAudio_MediaPlugins::setGain(F32 vol)
|
||||
|
||||
Reference in New Issue
Block a user