From 2cdd77d1c9bbbda729b2b78bced80837e1227f79 Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Wed, 1 Apr 2009 15:26:25 -0500
Subject: Added LLMediaBase::EDebugLevel and setDebugLevel stub.
---
linden/indra/llmedia/llmediabase.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'linden')
diff --git a/linden/indra/llmedia/llmediabase.h b/linden/indra/llmedia/llmediabase.h
index b5b9420..bf54a22 100644
--- a/linden/indra/llmedia/llmediabase.h
+++ b/linden/indra/llmedia/llmediabase.h
@@ -61,6 +61,21 @@ class LLMediaBase
// undoes everything init() didm called by the media manager when destroying a source
virtual bool reset() = 0;
+
+ /* Mirrors GStreamer debug levels. */
+ enum EDebugLevel {
+ DEBUG_LEVEL_NONE = 0,
+ DEBUG_LEVEL_ERROR,
+ DEBUG_LEVEL_WARNING,
+ DEBUG_LEVEL_INFO,
+ DEBUG_LEVEL_DEBUG,
+ DEBUG_LEVEL_LOG,
+ DEBUG_LEVEL_COUNT,
+ };
+
+ /* Set the debug verbosity level. Only implemented for GStreamer. */
+ virtual bool setDebugLevel( EDebugLevel level ) = 0;
+
// accessor for MIME type
virtual bool setMimeType( const std::string mime_type ) = 0;
virtual std::string getMimeType() const = 0;
--
cgit v1.1
From 713001efd41390bbcb28d071771ffae1201bab94 Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Wed, 1 Apr 2009 23:15:29 -0500
Subject: Added LLMediaImplCommon::setDebugLevel().
---
linden/indra/llmedia/llmediaimplcommon.cpp | 12 +++++++++++-
linden/indra/llmedia/llmediaimplcommon.h | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
(limited to 'linden')
diff --git a/linden/indra/llmedia/llmediaimplcommon.cpp b/linden/indra/llmedia/llmediaimplcommon.cpp
index abb61e1..48b3973 100644
--- a/linden/indra/llmedia/llmediaimplcommon.cpp
+++ b/linden/indra/llmedia/llmediaimplcommon.cpp
@@ -66,7 +66,8 @@ LLMediaImplCommon::LLMediaImplCommon() :
mCommand( LLMediaBase::COMMAND_NONE ),
mStatus( LLMediaBase::STATUS_UNKNOWN ),
mVolume( 0 ),
- mLooping( false )
+ mLooping( false ),
+ mDebugLevel( LLMediaBase::DEBUG_LEVEL_NONE )
{
}
@@ -92,6 +93,15 @@ bool LLMediaImplCommon::reset()
////////////////////////////////////////////////////////////////////////////////
// virtual (derives from LLMediaBase)
+bool LLMediaImplCommon::setDebugLevel( LLMediaBase::EDebugLevel level )
+{
+ mDebugLevel = level;
+
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// virtual (derives from LLMediaBase)
bool LLMediaImplCommon::setMimeType( const std::string mime_type )
{
mMimeType = mime_type;
diff --git a/linden/indra/llmedia/llmediaimplcommon.h b/linden/indra/llmedia/llmediaimplcommon.h
index aa6c4d5..8a726f1 100644
--- a/linden/indra/llmedia/llmediaimplcommon.h
+++ b/linden/indra/llmedia/llmediaimplcommon.h
@@ -54,6 +54,7 @@ class LLMediaImplCommon :
// housekeeping
virtual bool init();
virtual bool reset();
+ virtual bool setDebugLevel( LLMediaBase::EDebugLevel level );
virtual bool setMimeType( const std::string url );
virtual std::string getMimeType() const;
virtual std::string getMediaURL() const;
@@ -156,6 +157,7 @@ class LLMediaImplCommon :
LLMediaBase::ECommand mCommand;
LLMediaBase::EStatus mStatus;
bool mLooping;
+ LLMediaBase::EDebugLevel mDebugLevel;
};
#endif // LLMEDIAIMPLCOMMON_H
--
cgit v1.1
From e4792e0768162d07b45f8ed19002f7a13c3bebb4 Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Wed, 1 Apr 2009 23:47:05 -0500
Subject: Implemented LLMediaImplGstreamer::setDebugLevel().
---
linden/indra/llmedia/llmediaimplgstreamer.cpp | 12 ++++++++++++
linden/indra/llmedia/llmediaimplgstreamer.h | 2 ++
2 files changed, 14 insertions(+)
(limited to 'linden')
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 9a51b7f..82b1096 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -261,6 +261,18 @@ bool LLMediaImplGStreamer::closedown()
}
+bool LLMediaImplGStreamer::setDebugLevel( LLMediaBase::EDebugLevel level )
+{
+ // Do parent class stuff.
+ LLMediaImplCommon::setDebugLevel(level);
+
+ // Set GStreamer verbosity.
+ gst_debug_set_default_threshold( (GstDebugLevel)level );
+
+ return true;
+}
+
+
///////////////////////////////////////////////////////////////////////////////
//
// Uncomment the line below to enable spammy debug data.
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h
index 2918416..282da08 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer.h
@@ -69,6 +69,8 @@ class LLMediaImplGStreamer:
// Sets GST_PLUGIN_PATH env var for GStreamer.
static void set_gst_plugin_path();
+ /* virtual */ bool setDebugLevel( LLMediaBase::EDebugLevel level );
+
/* virtual */ std::string getVersion();
/* virtual */ bool navigateTo( const std::string url );
/* virtual */ bool updateMedia();
--
cgit v1.1
From ee0bef2d933c684a07c7cb02260f4a8ef768acab Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Sat, 28 Mar 2009 19:58:28 -0500
Subject: Added MediaDebugLevel setting in XML (does nothing yet).
---
linden/indra/newview/app_settings/settings.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'linden')
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 7405aad..1ecab2b 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -4659,6 +4659,17 @@
Value
0
+ MediaDebugLevel
+
MemoryLogFrequency