From: Patricia Muscalu Date: Tue, 5 Jun 2018 06:44:44 +0000 (+0200) Subject: Get payloader stats only for the sending streams X-Git-Tag: 1.19.3~495^2~275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=768fb5695c91ef1fb95ea056da0a5eace21168e6;p=platform%2Fupstream%2Fgstreamer.git Get payloader stats only for the sending streams Get/set payloader properties only for streams that actually contain a payloader element. https://bugzilla.gnome.org/show_bug.cgi?id=796523 --- diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index d987c1f..fb6998c 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -1826,6 +1826,9 @@ default_configure_client_media (GstRTSPClient * client, GstRTSPMedia * media, GstRTSPMessage *request = ctx->request; gchar *blocksize_str; + if (!gst_rtsp_stream_is_sender (stream)) + return TRUE; + if (gst_rtsp_message_get_header (request, GST_RTSP_HDR_BLOCKSIZE, &blocksize_str, 0) == GST_RTSP_OK) { guint64 blocksize; diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 0427b6b..578c385 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -604,6 +604,9 @@ do_query_position (GstRTSPStream * stream, DoQueryPositionData * data) { gint64 tmp; + if (!gst_rtsp_stream_is_sender (stream)) + return; + if (data->complete_streams_only && !gst_rtsp_stream_is_complete (stream)) { GST_DEBUG_OBJECT (stream, "stream not complete, do not query position"); return; @@ -3917,8 +3920,11 @@ static void do_set_seqnum (GstRTSPStream * stream) { guint16 seq_num; - seq_num = gst_rtsp_stream_get_current_seqnum (stream); - gst_rtsp_stream_set_seqnum_offset (stream, seq_num + 1); + + if (gst_rtsp_stream_is_sender (stream)) { + seq_num = gst_rtsp_stream_get_current_seqnum (stream); + gst_rtsp_stream_set_seqnum_offset (stream, seq_num + 1); + } } /* call with state_lock */ diff --git a/gst/rtsp-server/rtsp-sdp.c b/gst/rtsp-server/rtsp-sdp.c index 3795b42..da9f36f 100644 --- a/gst/rtsp-server/rtsp-sdp.c +++ b/gst/rtsp-server/rtsp-sdp.c @@ -288,8 +288,9 @@ gst_rtsp_sdp_make_media (GstSDPMessage * sdp, GstSDPInfo * info, GstRTSPPublishClockMode publish_clock_mode = gst_rtsp_stream_get_publish_clock_mode (stream); - gst_rtsp_stream_get_rtpinfo (stream, &rtptime, NULL, &clock_rate, - &running_time); + if (gst_rtsp_stream_is_sender (stream)) + gst_rtsp_stream_get_rtpinfo (stream, &rtptime, NULL, &clock_rate, + &running_time); base_time = gst_element_get_base_time (GST_ELEMENT_CAST (joined_bin)); g_assert (base_time != GST_CLOCK_TIME_NONE); clock_time = running_time + base_time; diff --git a/gst/rtsp-server/rtsp-session-media.c b/gst/rtsp-server/rtsp-session-media.c index 3138449..a1eb98e 100644 --- a/gst/rtsp-server/rtsp-session-media.c +++ b/gst/rtsp-server/rtsp-session-media.c @@ -281,6 +281,8 @@ gst_rtsp_session_media_get_rtpinfo (GstRTSPSessionMedia * media) } stream = gst_rtsp_stream_transport_get_stream (transport); + if (!gst_rtsp_stream_is_sender (stream)) + continue; if (!gst_rtsp_stream_get_rtpinfo (stream, NULL, NULL, NULL, &running_time)) continue; diff --git a/gst/rtsp-server/rtsp-stream-transport.c b/gst/rtsp-server/rtsp-stream-transport.c index a9aa897..9da62d8 100644 --- a/gst/rtsp-server/rtsp-stream-transport.c +++ b/gst/rtsp-server/rtsp-stream-transport.c @@ -339,6 +339,8 @@ gst_rtsp_stream_transport_get_rtpinfo (GstRTSPStreamTransport * trans, priv = trans->priv; + if (!gst_rtsp_stream_is_sender (priv->stream)) + return NULL; if (!gst_rtsp_stream_get_rtpinfo (priv->stream, &rtptime, &seq, &clock_rate, &running_time)) return NULL;