[farsight2/master] Load the blueprints when creating a new session and unload then on session disposal
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:52 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index ea3b227..4bcd546 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -40,6 +40,7 @@
#include "fs-rtp-session.h"
#include "fs-rtp-stream.h"
#include "fs-rtp-participant.h"
+#include "fs-rtp-discover-codecs.h"
/* Signals */
@@ -100,6 +101,8 @@ struct _FsRtpSessionPrivate
GList *streams;
GList *free_substreams;
+ GList *blueprints;
+
GList *local_codecs_configuration;
GList *local_codecs;
@@ -288,6 +291,11 @@ fs_rtp_session_dispose (GObject *object)
return;
}
+ if (self->priv->blueprints) {
+ fs_rtp_blueprints_unref (self->priv->media_type);
+ self->priv->blueprints = NULL;
+ }
+
if (self->priv->media_sink_valve) {
gst_bin_remove (GST_BIN (self->priv->conference),
self->priv->media_sink_valve);
@@ -486,6 +494,18 @@ fs_rtp_session_constructed (GObject *object)
return;
}
+ self->priv->blueprints = fs_rtp_blueprints_get (self->priv->media_type,
+ &self->priv->construction_error);
+
+ if (!self->priv->blueprints) {
+ if (!self->priv->construction_error)
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_INTERNAL,
+ "Unknown error while trying to discover codecs");
+ return;
+ }
+
+
tmp = g_strdup_printf ("valve_send_%d", self->id);
valve = gst_element_factory_make ("fsvalve", tmp);
g_free (tmp);
--
1.5.6.5
More information about the farsight-commits
mailing list