From c9ba230c987e27b1cabc208f0dd21cc6cf09e553 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 2 Apr 2009 01:05:17 -0500 Subject: Implemented handleMediaDebugLevelChanged hook. --- ChangeLog.txt | 6 ++++++ linden/indra/newview/llviewercontrol.cpp | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 026a52b..a7ad544 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,9 @@ +2009-04-02 Jacek Antonelli + + * linden/indra/newview/llviewercontrol.cpp: + Implemented handleMediaDebugLevelChanged hook. + + 2009-04-01 Jacek Antonelli * linden/indra/newview/app_settings/settings.xml: diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 7a30b22..a8a3b16 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -70,6 +70,7 @@ #include "llvosurfacepatch.h" #include "llvowlsky.h" #include "llrender.h" +#include "llmediamanager.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -429,6 +430,22 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) return true; } +bool handleMediaDebugLevelChanged(const LLSD& newvalue) +{ + LLMediaManager *mgr = LLMediaManager::getInstance(); + if (mgr) + { + LLMediaBase *impl = + mgr->createSourceFromMimeType("http", "audio/mpeg"); + + if (impl) + { + impl->setDebugLevel( (LLMediaBase::EDebugLevel)newvalue.asInteger() ); + } + } + return true; +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -556,6 +573,7 @@ void settings_setup_listeners() gSavedSettings.getControl("VoiceInputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("VoiceOutputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1)); } template <> eControlType get_control_type(const U32& in, LLSD& out) -- cgit v1.1