mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
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.
This commit is contained in:
parent
3bebd53b6f
commit
3563bbaabd
1 changed files with 29 additions and 0 deletions
|
@ -1545,6 +1545,33 @@ gst_rtp_session_query_send_rtcp_src (GstPad * pad, GstQuery * query)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static gboolean
|
||||||
gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event)
|
gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
|
@ -1872,6 +1899,8 @@ create_send_rtcp_src (GstRtpSession * rtpsession)
|
||||||
gst_rtp_session_internal_links);
|
gst_rtp_session_internal_links);
|
||||||
gst_pad_set_query_function (rtpsession->send_rtcp_src,
|
gst_pad_set_query_function (rtpsession->send_rtcp_src,
|
||||||
gst_rtp_session_query_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),
|
gst_element_add_pad (GST_ELEMENT_CAST (rtpsession),
|
||||||
rtpsession->send_rtcp_src);
|
rtpsession->send_rtcp_src);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue