From 03d9faf5fa8e27f433d5c247801ec7257a7428f7 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Fri, 11 Jan 2008 16:45:57 +0000 Subject: gst/rtpmanager/: Make it possible to use different user_data for each of the callbacks. Original commit message from CVS: Patch by: Youness Alaoui * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_clock_rate): * gst/rtpmanager/rtpsession.c: (rtp_session_set_callbacks), (rtp_session_set_process_rtp_callback), (rtp_session_set_send_rtp_callback), (rtp_session_set_send_rtcp_callback), (rtp_session_set_sync_rtcp_callback), (rtp_session_set_clock_rate_callback), (rtp_session_set_reconsider_callback), (source_push_rtp), (source_clock_rate), (rtp_session_process_bye), (rtp_session_process_rtcp), (rtp_session_send_bye), (rtp_session_on_timeout): * gst/rtpmanager/rtpsession.h: Make it possible to use different user_data for each of the callbacks. Fixes #508587. --- gst/rtpmanager/gstrtpsession.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gst/rtpmanager/gstrtpsession.c') diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 790a0a1d..ffdaf901 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -286,8 +286,8 @@ static void gst_rtp_session_reconsider (RTPSession * sess, gpointer user_data); static RTPSessionCallbacks callbacks = { gst_rtp_session_process_rtp, gst_rtp_session_send_rtp, - gst_rtp_session_send_rtcp, gst_rtp_session_sync_rtcp, + gst_rtp_session_send_rtcp, gst_rtp_session_clock_rate, gst_rtp_session_reconsider }; @@ -1188,6 +1188,8 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload, GST_RTP_SESSION_LOCK (rtpsession); ipayload = payload; /* make compiler happy */ caps = g_hash_table_lookup (priv->ptmap, GINT_TO_POINTER (ipayload)); + /* TODO : check if we should really goto done. This will return -1 + * instead of the clock rate of the caps we just found! */ if (caps) goto done; @@ -1208,6 +1210,7 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload, gst_rtp_session_cache_caps (rtpsession, caps); + /* TODO : This is where we should 'goto' */ s = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (s, "clock-rate", &result)) goto no_clock_rate; -- cgit