[farsight2/master] Use GError to report non-implementedness from the transmitter classes too
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:25 PST 2008
---
gst-libs/gst/farsight/fs-stream-transmitter.c | 10 +++++++---
gst-libs/gst/farsight/fs-transmitter.c | 5 ++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 61edf27..9fc188d 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -41,6 +41,8 @@
#include "fs-marshal.h"
#include "fs-stream-transmitter.h"
+#include "fs-stream.h"
+
#include <gst/gst.h>
/* Signals */
@@ -311,7 +313,8 @@ fs_stream_transmitter_add_remote_candidate (
if (klass->add_remote_candidate) {
return klass->add_remote_candidate (streamtransmitter, candidate, error);
} else {
- g_warning ("add_remote_candidate not defined in class");
+ g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ "add_remote_candidate not defined in stream transmitter class");
}
return FALSE;
@@ -336,7 +339,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 class");
+ g_warning ("remote_candidates_added not defined in transmitter class");
}
}
@@ -365,7 +368,8 @@ fs_stream_transmitter_select_candidate_pair (
return klass->select_candidate_pair (streamtransmitter, lfoundation, rfoundation,
error);
} else {
- g_warning ("select_candidate_pair not defined in class");
+ g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ "select_candidate_pair not defined in stream transmitter class");
}
return FALSE;
diff --git a/gst-libs/gst/farsight/fs-transmitter.c b/gst-libs/gst/farsight/fs-transmitter.c
index a9cd04e..1793942 100644
--- a/gst-libs/gst/farsight/fs-transmitter.c
+++ b/gst-libs/gst/farsight/fs-transmitter.c
@@ -43,6 +43,8 @@
#include "fs-plugin.h"
+#include "fs-stream.h"
+
#include <gst/gst.h>
/* Signals */
@@ -259,7 +261,8 @@ fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
return klass->new_stream_transmitter (transmitter, participant,
n_parameters, parameters, error);
} else {
- g_warning ("new_stream_transmitter not defined in class");
+ g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ "new_stream_transmitter not defined in class");
}
return NULL;
--
1.5.6.5
More information about the farsight-commits
mailing list