[farsight2/master] Add function to remove config params from a codec

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:22:55 PST 2008


---
 gst/fsrtpconference/fs-rtp-specific-nego.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-specific-nego.c b/gst/fsrtpconference/fs-rtp-specific-nego.c
index 0de9896..3ef70df 100644
--- a/gst/fsrtpconference/fs-rtp-specific-nego.c
+++ b/gst/fsrtpconference/fs-rtp-specific-nego.c
@@ -109,6 +109,28 @@ codec_has_config_data_named (FsCodec *codec, const gchar *name)
 }
 
 FsCodec *
+codec_copy_without_config (FsCodec *codec)
+{
+  FsCodec *copy = fs_codec_copy (codec);
+  GList *item = NULL;
+
+  for (item = copy->optional_params; item;)
+  {
+    FsCodecParameter *param = item->data;
+    GList *next = g_list_next (item);
+
+    if (codec_has_config_data_named (codec, param->name))
+      fs_codec_remove_optional_parameter (copy, param);
+
+    item = next;
+  }
+
+  return copy;
+}
+
+
+
+FsCodec *
 sdp_is_compat (FsCodec *local_codec, FsCodec *remote_codec)
 {
   gint i;
-- 
1.5.6.5




More information about the farsight-commits mailing list