[farsight2/master] Use the Gst error stuff for the base classes too
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:33 PST 2008
---
gst-libs/gst/farsight/fs-base-conference.c | 4 ++--
gst-libs/gst/farsight/fs-codec.c | 16 ++++++++++------
gst-libs/gst/farsight/fs-conference-iface.h | 1 +
gst-libs/gst/farsight/fs-plugin.c | 12 +++++++-----
gst-libs/gst/farsight/fs-session.c | 6 ++++--
gst-libs/gst/farsight/fs-stream-transmitter.c | 4 +++-
gst-libs/gst/farsight/fs-stream.c | 2 +-
7 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-base-conference.c b/gst-libs/gst/farsight/fs-base-conference.c
index c9d7af2..c049c16 100644
--- a/gst-libs/gst/farsight/fs-base-conference.c
+++ b/gst-libs/gst/farsight/fs-base-conference.c
@@ -39,7 +39,7 @@
#include "fs-base-conference.h"
#include "fs-session.h"
-GST_DEBUG_CATEGORY_STATIC (fs_base_conference_debug);
+GST_DEBUG_CATEGORY (fs_base_conference_debug);
#define GST_CAT_DEFAULT fs_base_conference_debug
/* Signals */
@@ -87,7 +87,7 @@ static void
fs_base_conference_base_init (gpointer g_class)
{
GST_DEBUG_CATEGORY_INIT (fs_base_conference_debug, "fsbaseconference", 0,
- "farsight base conference element");
+ "farsight base conference library");
}
static void
diff --git a/gst-libs/gst/farsight/fs-codec.c b/gst-libs/gst/farsight/fs-codec.c
index fd24846..70af6be 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -27,8 +27,12 @@
#include "fs-codec.h"
+#include "fs-conference-iface.h"
+
#include <string.h>
+#define GST_CAT_DEFAULT fs_base_conference_debug
+
/**
* SECTION:fs-codec
* @short_description: Structure representing a media codec
@@ -271,21 +275,21 @@ fs_codec_list_from_keyfile (const gchar *filename, GError **error)
if (!keys || gerror) {
if (gerror) {
- g_warning ("Unable to read parameters for %s: %s\n",
+ GST_WARNING ("Unable to read parameters for %s: %s\n",
groups[i], gerror->message);
- g_clear_error (&gerror);
} else {
- g_warning ("Unknown errors while reading parameters for %s",
+ GST_WARNING ("Unknown errors while reading parameters for %s",
groups[i]);
}
+ g_clear_error (&gerror);
goto next_codec;
}
next_tok = strchr (groups[i], '/');
if (!next_tok) {
- g_warning ("Invalid codec name: %s", groups[i]);
+ GST_WARNING ("Invalid codec name: %s", groups[i]);
goto next_codec;
}
@@ -296,7 +300,7 @@ fs_codec_list_from_keyfile (const gchar *filename, GError **error)
!g_ascii_strncasecmp ("video", groups[i], 5))
codec->media_type = FS_MEDIA_TYPE_VIDEO;
else {
- g_warning ("Invalid media type in codec name name %s", groups[i]);
+ GST_WARNING ("Invalid media type in codec name name %s", groups[i]);
goto next_codec;
}
@@ -367,7 +371,7 @@ fs_codec_list_from_keyfile (const gchar *filename, GError **error)
}
continue;
keyerror:
- g_warning ("Error reading key %s codec %s: %s", keys[j], groups[i],
+ GST_WARNING ("Error reading key %s codec %s: %s", keys[j], groups[i],
gerror->message);
g_clear_error (&gerror);
diff --git a/gst-libs/gst/farsight/fs-conference-iface.h b/gst-libs/gst/farsight/fs-conference-iface.h
index e853be5..7ed692d 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.h
+++ b/gst-libs/gst/farsight/fs-conference-iface.h
@@ -116,6 +116,7 @@ typedef enum {
GQuark fs_error_quark (void);
+GST_DEBUG_CATEGORY_EXTERN (fs_base_conference_debug);
/* virtual class function wrappers */
FsSession *fs_conference_new_session (FsConference *conference,
diff --git a/gst-libs/gst/farsight/fs-plugin.c b/gst-libs/gst/farsight/fs-plugin.c
index 3caeda6..f56f32e 100644
--- a/gst-libs/gst/farsight/fs-plugin.c
+++ b/gst-libs/gst/farsight/fs-plugin.c
@@ -35,6 +35,8 @@
#include <string.h>
+#define GST_CAT_DEFAULT fs_base_conference_debug
+
/**
* SECTION:fs-plugin
* @short_description: A class for defining Farsight plugins
@@ -160,12 +162,12 @@ static gboolean fs_plugin_load (GTypeModule *module)
g_return_val_if_fail (plugin->name != NULL && plugin->name[0] != '\0', FALSE);
for (search_path = search_paths; *search_path; search_path++) {
- g_debug("looking for plugins in %s", *search_path);
+ GST_DEBUG("looking for plugins in %s", *search_path);
path = g_module_build_path(*search_path, plugin->name);
plugin->priv->handle = g_module_open (path, G_MODULE_BIND_LOCAL);
- g_debug ("opening module %s: %s\n", path,
+ GST_INFO ("opening module %s: %s\n", path,
(plugin->priv->handle != NULL) ? "succeeded" : g_module_error ());
g_free (path);
@@ -178,7 +180,7 @@ static gboolean fs_plugin_load (GTypeModule *module)
(gpointer) & fs_init_plugin)) {
g_module_close (plugin->priv->handle);
plugin->priv->handle = NULL;
- g_warning ("could not find init function in plugin\n");
+ GST_WARNING ("could not find init function in plugin\n");
continue;
}
@@ -193,7 +195,7 @@ static gboolean fs_plugin_load (GTypeModule *module)
fs_init_plugin (plugin);
if (!plugin->type) {
/* TODO error handling (init error or no info defined) */
- g_warning ("init error or no info defined");
+ GST_WARNING ("init error or no info defined");
goto err_close_module;
}
@@ -214,7 +216,7 @@ fs_plugin_unload (GTypeModule *module)
plugin = FS_PLUGIN (module);
- g_debug("Unloading plugin %s", plugin->name);
+ GST_INFO("Unloading plugin %s", plugin->name);
if (plugin->unload != NULL)
plugin->unload (plugin);
diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index a69a03b..d3383b6 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -49,6 +49,8 @@
#include "fs-enum-types.h"
#include <gst/gst.h>
+#define GST_CAT_DEFAULT fs_base_conference_debug
+
/* Signals */
enum
{
@@ -398,7 +400,7 @@ fs_session_start_telephony_event (FsSession *session, guint8 event,
if (klass->start_telephony_event) {
return klass->start_telephony_event (session, event, volume, method);
} else {
- g_warning ("start_telephony_event not defined in class");
+ GST_WARNING ("start_telephony_event not defined in class");
}
return FALSE;
}
@@ -425,7 +427,7 @@ fs_session_stop_telephony_event (FsSession *session, FsDTMFMethod method)
if (klass->stop_telephony_event) {
return klass->stop_telephony_event (session, method);
} else {
- g_warning ("stop_telephony_event not defined in class");
+ GST_WARNING ("stop_telephony_event not defined in class");
}
return FALSE;
}
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 5478a30..a3bf00d 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -45,6 +45,8 @@
#include <gst/gst.h>
+#define GST_CAT_DEFAULT fs_base_conference_debug
+
/* Signals */
enum
{
@@ -316,7 +318,7 @@ fs_stream_transmitter_remote_candidates_added (
if (klass->remote_candidates_added) {
klass->remote_candidates_added (streamtransmitter);
} else {
- g_warning ("remote_candidates_added not defined in transmitter class");
+ GST_WARNING ("remote_candidates_added not defined in transmitter class");
}
}
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index e91ca28..94b05a5 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -417,7 +417,7 @@ fs_stream_remote_candidates_added (FsStream *stream)
if (klass->remote_candidates_added) {
klass->remote_candidates_added (stream);
} else {
- g_warning ("remote_candidates_added not defined in class");
+ GST_WARNING ("remote_candidates_added not defined in class");
}
}
--
1.5.6.5
More information about the farsight-commits
mailing list