[farsight2/master] Implement request_pt_map

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


---
 gst/fsrtpconference/fs-rtp-session.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 4bcd546..be160ff 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -41,6 +41,7 @@
 #include "fs-rtp-stream.h"
 #include "fs-rtp-participant.h"
 #include "fs-rtp-discover-codecs.h"
+#include "fs-rtp-codec-negotiation.h"
 
 
 /* Signals */
@@ -897,7 +898,22 @@ fs_rtp_session_new (FsMediaType media_type, FsRtpConference *conference,
 GstCaps *
 fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt)
 {
-  return NULL;
+  GstCaps *caps = NULL;
+  CodecAssociation *ca = NULL;
+
+  FS_SESSION_LOCK (session);
+
+  if (session->priv->negotiated_codec_associations) {
+    ca = g_hash_table_lookup (session->priv->negotiated_codec_associations,
+      GINT_TO_POINTER (pt));
+
+    if (ca)
+      caps = fs_codec_to_gst_caps (ca->codec);
+  }
+
+  FS_SESSION_UNLOCK (session);
+
+  return caps;
 }
 
 
-- 
1.5.6.5




More information about the farsight-commits mailing list