From 30a1e0151802e78d6b72f9ca29213d91991c4e50 Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Date: Fri, 25 May 2007 10:27:09 +0000 Subject: [MOVED FROM GST-P-FARSIGHT] Ville's original patch to fix the traversal of dtmf event 20070525102709-f3f1e-6c41d1ef934068a4f4e810e7e981b420075b0c98.gz --- gst/rtpmux/gstrtpmux.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gst') diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index fd687539..08ff73f8 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -181,6 +181,29 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass) klass->chain_func = gst_rtp_mux_chain; } +static gboolean gst_rtp_mux_src_event (GstPad * pad, + GstEvent * event) +{ + gboolean result = TRUE; + GList *orig, *pads; + + orig = pads = gst_pad_get_internal_links (pad); + + while (pads) { + GstPad *eventpad = GST_PAD_CAST (pads->data); + pads = g_list_next (pads); + + gst_event_ref (event); + result &= gst_pad_push_event (eventpad, event); + } + + g_list_free (orig); + + gst_event_unref (event); + + return result; +} + static void gst_rtp_mux_init (GstRTPMux * rtp_mux) { @@ -189,6 +212,7 @@ gst_rtp_mux_init (GstRTPMux * rtp_mux) rtp_mux->srcpad = gst_pad_new_from_template (gst_element_class_get_pad_template (klass, "src"), "src"); + gst_pad_set_event_function (rtp_mux->srcpad, gst_rtp_mux_src_event); gst_element_add_pad (GST_ELEMENT (rtp_mux), rtp_mux->srcpad); rtp_mux->ssrc = DEFAULT_SSRC; -- cgit v1.2.1