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
This commit is contained in:
Patricia Muscalu 2018-06-05 08:44:44 +02:00 committed by Sebastian Dröge
parent 89e6ee73b1
commit 768fb5695c
5 changed files with 18 additions and 4 deletions

View file

@ -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;

View file

@ -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 */

View file

@ -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;

View file

@ -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;

View file

@ -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;