diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2011-02-07 15:39:42 +0100 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2011-10-11 15:37:14 -0400 |
commit | 8f1682fdb15dda2aa0081cee0e05461a1ec5cdb9 (patch) | |
tree | d2a3d825ad8878da7ef506f32115875532e47b9b /gst/fsrawconference | |
parent | 252ce36964bf77858590e3f3a56d43b74718ff2b (diff) | |
download | farstream-8f1682fdb15dda2aa0081cee0e05461a1ec5cdb9.tar.gz |
rawstream: Implement force_remote_candidates
Diffstat (limited to 'gst/fsrawconference')
-rw-r--r-- | gst/fsrawconference/fs-raw-stream.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gst/fsrawconference/fs-raw-stream.c b/gst/fsrawconference/fs-raw-stream.c index 51421172..9eb7fea1 100644 --- a/gst/fsrawconference/fs-raw-stream.c +++ b/gst/fsrawconference/fs-raw-stream.c @@ -180,6 +180,9 @@ static void _state_changed (FsStreamTransmitter *stream_transmitter, static gboolean fs_raw_stream_set_remote_candidates (FsStream *stream, GList *candidates, GError **error); +static gboolean fs_raw_stream_force_remote_candidates (FsStream *stream, + GList *remote_candidates, + GError **error); static gboolean fs_raw_stream_set_remote_codecs (FsStream *stream, GList *remote_codecs, GError **error); @@ -199,6 +202,7 @@ fs_raw_stream_class_init (FsRawStreamClass *klass) gobject_class->finalize = fs_raw_stream_finalize; stream_class->set_remote_candidates = fs_raw_stream_set_remote_candidates; + stream_class->force_remote_candidates = fs_raw_stream_force_remote_candidates; stream_class->set_remote_codecs = fs_raw_stream_set_remote_codecs; @@ -695,6 +699,39 @@ fs_raw_stream_set_remote_candidates (FsStream *stream, GList *candidates, /** + * fs_raw_stream_force_remote_candidate: + */ +static gboolean +fs_raw_stream_force_remote_candidates (FsStream *stream, + GList *candidates, + GError **error) +{ + FsRawStream *self = FS_RAW_STREAM (stream); + FsRawConference *conference = fs_raw_stream_get_conference (self, error); + FsStreamTransmitter *st = NULL; + gboolean ret = FALSE; + + if (!conference) + return FALSE; + + GST_OBJECT_LOCK (conference); + if (self->priv->stream_transmitter) + st = g_object_ref (self->priv->stream_transmitter); + GST_OBJECT_UNLOCK (conference); + + if (st) + { + ret = fs_stream_transmitter_force_remote_candidates (st, candidates, error); + g_object_unref (st); + } + + gst_object_unref (conference); + + return ret; +} + + +/** * fs_raw_stream_set_remote_codecs: * @stream: an #FsStream * @remote_codecs: a #GList of #FsCodec representing the remote codecs |