diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-10-16 09:51:28 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-10-16 09:51:28 +0000 |
commit | 126e0fd0f4eed7cb748c2d7f6b2bed23c79ced35 (patch) | |
tree | c5d6fbe5f3ae2dfb2d36f00c7e3fb564f99a4c18 /gst | |
parent | 37167605cdeaf7c9dcb39c80c0c0efb7f589b11f (diff) | |
download | gst-plugins-bad-126e0fd0f4eed7cb748c2d7f6b2bed23c79ced35.tar.gz gst-plugins-bad-126e0fd0f4eed7cb748c2d7f6b2bed23c79ced35.tar.bz2 gst-plugins-bad-126e0fd0f4eed7cb748c2d7f6b2bed23c79ced35.zip |
gst/rtpmanager/gstrtpsession.c: Install event handler on the rtcp_src pad, make LATENCY event return
Original commit message from CVS:
* gst/rtpmanager/gstrtpsession.c:
(gst_rtp_session_event_send_rtcp_src), (create_send_rtcp_src):
Install event handler on the rtcp_src pad, make LATENCY event return
TRUE.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index fdc4ea2e..ec744a5b 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1546,6 +1546,33 @@ gst_rtp_session_query_send_rtcp_src (GstPad * pad, GstQuery * query) } static gboolean +gst_rtp_session_event_send_rtcp_src (GstPad * pad, GstEvent * event) +{ + GstRtpSession *rtpsession; + GstRtpSessionPrivate *priv; + gboolean ret = FALSE; + + rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad)); + priv = rtpsession->priv; + + GST_DEBUG_OBJECT (rtpsession, "received EVENT"); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_LATENCY: + ret = TRUE; + break; + default: + /* other events simply fail for now */ + break; + } + + gst_object_unref (rtpsession); + + return ret; +} + + +static gboolean gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event) { GstRtpSession *rtpsession; @@ -1872,6 +1899,8 @@ create_send_rtcp_src (GstRtpSession * rtpsession) gst_rtp_session_internal_links); gst_pad_set_query_function (rtpsession->send_rtcp_src, gst_rtp_session_query_send_rtcp_src); + gst_pad_set_event_function (rtpsession->send_rtcp_src, + gst_rtp_session_event_send_rtcp_src); gst_element_add_pad (GST_ELEMENT_CAST (rtpsession), rtpsession->send_rtcp_src); |