diff options
author | Jacek Antonelli | 2009-04-02 02:29:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-02 03:27:26 -0500 |
commit | 33e649ca1bca260de474842d30d3bf8178e61be4 (patch) | |
tree | 5bcbd026c8625ad053d34e6c4f9fbe8b425a03b3 | |
parent | Implemented handleMediaDebugLevelChanged hook. (diff) | |
download | meta-impy-33e649ca1bca260de474842d30d3bf8178e61be4.zip meta-impy-33e649ca1bca260de474842d30d3bf8178e61be4.tar.gz meta-impy-33e649ca1bca260de474842d30d3bf8178e61be4.tar.bz2 meta-impy-33e649ca1bca260de474842d30d3bf8178e61be4.tar.xz |
Implemented LLMediaImplGStreamer::gstreamer_log().
Diffstat (limited to '')
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 40 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.h | 15 |
3 files changed, 61 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index a7ad544..d0f2f6c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,5 +1,11 @@ | |||
1 | 2009-04-02 Jacek Antonelli <jacek.antonelli@gmail.com> | 1 | 2009-04-02 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 2 | ||
3 | * linden/indra/llmedia/llmediaimplgstreamer.cpp: | ||
4 | Implemented LLMediaImplGStreamer::gstreamer_log(). | ||
5 | * linden/indra/llmedia/llmediaimplgstreamer.h: | ||
6 | Ditto. | ||
7 | |||
8 | |||
3 | * linden/indra/newview/llviewercontrol.cpp: | 9 | * linden/indra/newview/llviewercontrol.cpp: |
4 | Implemented handleMediaDebugLevelChanged hook. | 10 | Implemented handleMediaDebugLevelChanged hook. |
5 | 11 | ||
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 82b1096..8cbfb60 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -255,6 +255,46 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
255 | } | 255 | } |
256 | 256 | ||
257 | 257 | ||
258 | void LLMediaImplGStreamer::gstreamer_log(GstDebugCategory *category, | ||
259 | GstDebugLevel level, | ||
260 | const gchar *file, | ||
261 | const gchar *function, | ||
262 | gint line, | ||
263 | GObject *object, | ||
264 | GstDebugMessage *message, | ||
265 | gpointer data) | ||
266 | { | ||
267 | std::stringstream log(std::stringstream::out); | ||
268 | |||
269 | // Log format example: | ||
270 | // | ||
271 | // GST_ELEMENT_PADS: removing pad 'sink' (in gstelement.c:757:gst_element_remove_pad) | ||
272 | // | ||
273 | log << gst_debug_category_get_name( category ) << ": " | ||
274 | << gst_debug_message_get(message) << " " | ||
275 | << "(in " << file << ":" << line << ":" << function << ")"; | ||
276 | |||
277 | switch( level ) | ||
278 | { | ||
279 | case GST_LEVEL_ERROR: | ||
280 | LL_ERRS("MediaImpl") << log.str() << LL_ENDL; | ||
281 | break; | ||
282 | case GST_LEVEL_WARNING: | ||
283 | LL_WARNS("MediaImpl") << log.str() << LL_ENDL; | ||
284 | break; | ||
285 | case GST_LEVEL_DEBUG: | ||
286 | LL_DEBUGS("MediaImpl") << log.str() << LL_ENDL; | ||
287 | break; | ||
288 | case GST_LEVEL_INFO: | ||
289 | LL_INFOS("MediaImpl") << log.str() << LL_ENDL; | ||
290 | break; | ||
291 | default: | ||
292 | // Do nothing. | ||
293 | break; | ||
294 | } | ||
295 | } | ||
296 | |||
297 | |||
258 | bool LLMediaImplGStreamer::closedown() | 298 | bool LLMediaImplGStreamer::closedown() |
259 | { | 299 | { |
260 | return true; | 300 | return true; |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index 282da08..37eaf53 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h | |||
@@ -71,6 +71,21 @@ class LLMediaImplGStreamer: | |||
71 | 71 | ||
72 | /* virtual */ bool setDebugLevel( LLMediaBase::EDebugLevel level ); | 72 | /* virtual */ bool setDebugLevel( LLMediaBase::EDebugLevel level ); |
73 | 73 | ||
74 | // Function given to GStreamer for handling debug messages | ||
75 | static void gstreamer_log(GstDebugCategory *category, | ||
76 | GstDebugLevel level, | ||
77 | const gchar *file, | ||
78 | const gchar *function, | ||
79 | gint line, | ||
80 | GObject *object, | ||
81 | GstDebugMessage *message, | ||
82 | gpointer data) | ||
83 | #if __GNUC__ | ||
84 | // recommended by the gstreamer docs | ||
85 | G_GNUC_NO_INSTRUMENT | ||
86 | #endif | ||
87 | ; | ||
88 | |||
74 | /* virtual */ std::string getVersion(); | 89 | /* virtual */ std::string getVersion(); |
75 | /* virtual */ bool navigateTo( const std::string url ); | 90 | /* virtual */ bool navigateTo( const std::string url ); |
76 | /* virtual */ bool updateMedia(); | 91 | /* virtual */ bool updateMedia(); |