[farsight2/master] Add function to check if a codec association is valid for sending
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:39 PST 2008
---
gst/fsrtpconference/fs-rtp-codec-negotiation.c | 11 +++++++++++
gst/fsrtpconference/fs-rtp-codec-negotiation.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index 14469f9..dd98d9e 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -694,3 +694,14 @@ codec_associations_to_codecs (GList *codec_associations)
return codecs;
}
+
+gboolean
+codec_association_is_valid_for_sending (CodecAssociation *ca)
+{
+ if (!ca->disable &&
+ !ca->recv_only &&
+ ca->blueprint && ca->blueprint->send_pipeline_factory)
+ return TRUE;
+ else
+ return FALSE;
+}
diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.h b/gst/fsrtpconference/fs-rtp-codec-negotiation.h
index 9bfd1c3..2ce6642 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.h
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.h
@@ -79,6 +79,9 @@ lookup_codec_association_by_pt (GList *codec_associations, gint pt);
CodecAssociation *
lookup_codec_association_by_codec (GList *codec_associations, FsCodec *codec);
+gboolean
+codec_association_is_valid_for_sending (CodecAssociation *ca);
+
GList *
codec_associations_to_codecs (GList *codec_associations);
--
1.5.6.5
More information about the farsight-commits
mailing list