[farsight2/master] Allow more than one set of config parameters to be discovered on a codec
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:23:21 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 8039ff4..9471caf 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -3325,15 +3325,15 @@ _discovery_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session)
ca = lookup_codec_association_by_codec (session->priv->codec_associations,
session->priv->discovery_codec);
- fs_codec_destroy (session->priv->discovery_codec);
- session->priv->discovery_codec = NULL;
-
if (!ca)
goto out;
-
gather_caps_parameters (ca, caps);
+ fs_codec_destroy (session->priv->discovery_codec);
+ session->priv->discovery_codec = NULL;
+ session->priv->discovery_codec = fs_codec_copy (ca->codec);
+
out:
FS_RTP_SESSION_UNLOCK (session);
@@ -3361,6 +3361,7 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
{
GstPad *pad = NULL;
gchar *tmp;
+ GstCaps *caps;
FS_RTP_SESSION_LOCK (session);
@@ -3376,6 +3377,9 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
session->priv->discovery_codecbin = NULL;
}
+ fs_codec_destroy (session->priv->discovery_codec);
+ session->priv->discovery_codec = NULL;
+
/* They must both exist or neither exists, anything else is wrong */
if ((session->priv->discovery_fakesink == NULL ||
session->priv->discovery_capsfilter == NULL) &&
@@ -3572,10 +3576,6 @@ _send_sink_pad_blocked_callback (GstPad *pad, gboolean blocked,
FS_RTP_SESSION_LOCK (session);
- if (session->priv->discovery_codec)
- goto out;
-
-
/* Find out if there is a codec that needs the config to be fetched */
for (item = g_list_first (session->priv->codec_associations);
item;
@@ -3598,6 +3598,9 @@ _send_sink_pad_blocked_callback (GstPad *pad, gboolean blocked,
goto out;
}
+ if (fs_codec_are_equal (ca->codec, session->priv->discovery_codec))
+ goto out;
+
if (!fs_rtp_session_get_codec_params (session, ca, &error))
{
fs_rtp_session_stop_codec_param_gathering (session);
--
1.5.6.5
More information about the farsight-commits
mailing list