[farsight2/master] Make the agent into a public member
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:11 PST 2008
---
transmitters/nice/fs-nice-transmitter.c | 18 ++++++++----------
transmitters/nice/fs-nice-transmitter.h | 4 ++++
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index 82169ba..ec20bda 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -80,8 +80,6 @@ struct _FsNiceTransmitterPrivate
GMainContext *main_context;
GMainLoop *main_loop;
- NiceAgent *agent;
-
NiceUDPSocketFactory udpfactory;
guint compatiblity_mode;
@@ -415,10 +413,10 @@ fs_nice_transmitter_dispose (GObject *object)
self->priv->gst_sink = NULL;
}
- if (self->priv->agent)
+ if (self->agent)
{
- g_object_unref (self->priv->agent);
- self->priv->agent = NULL;
+ g_object_unref (self->agent);
+ self->agent = NULL;
}
parent_class->dispose (object);
@@ -682,17 +680,17 @@ fs_nice_transmitter_start (FsNiceTransmitter *self, GError **error)
FS_NICE_TRANSMITTER_UNLOCK (self);
}
- self->priv->agent = nice_agent_new (&self->priv->udpfactory,
+ self->agent = nice_agent_new (&self->priv->udpfactory,
self->priv->main_context,
self->priv->compatiblity_mode);
- g_signal_connect (self->priv->agent, "component-state-changed",
+ g_signal_connect (self->agent, "component-state-changed",
G_CALLBACK (agent_component_state_changed), self);
- g_signal_connect (self->priv->agent, "candidate-gathering-done",
+ g_signal_connect (self->agent, "candidate-gathering-done",
G_CALLBACK (agent_candidate_gathering_done), self);
- g_signal_connect (self->priv->agent, "new-selected-pair",
+ g_signal_connect (self->agent, "new-selected-pair",
G_CALLBACK (agent_new_selected_pair), self);
- g_signal_connect (self->priv->agent, "new-candidate",
+ g_signal_connect (self->agent, "new-candidate",
G_CALLBACK (agent_new_candidate), self);
return fs_nice_transmitter_start_thread (self, error);
diff --git a/transmitters/nice/fs-nice-transmitter.h b/transmitters/nice/fs-nice-transmitter.h
index 8d8ee05..5916590 100644
--- a/transmitters/nice/fs-nice-transmitter.h
+++ b/transmitters/nice/fs-nice-transmitter.h
@@ -28,6 +28,7 @@
#include <gst/farsight/fs-transmitter.h>
#include <gst/gst.h>
+#include <agent.h>
G_BEGIN_DECLS
@@ -77,6 +78,9 @@ struct _FsNiceTransmitter
/* The number of components (READONLY)*/
gint components;
+ /* The agent, don't modify the pointer */
+ NiceAgent *agent;
+
/*< private >*/
FsNiceTransmitterPrivate *priv;
};
--
1.5.6.5
More information about the farsight-commits
mailing list