mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 19:22:15 +00:00
rtpsource: doesn't handle probation and rtp gap in case of sender
https://bugzilla.gnome.org/show_bug.cgi?id=754548
This commit is contained in:
parent
2b1f52755d
commit
b814d7ed25
1 changed files with 67 additions and 64 deletions
|
@ -1005,7 +1005,8 @@ do_bitrate_estimation (RTPSource * src, GstClockTime running_time,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo)
|
update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo,
|
||||||
|
gboolean is_receive)
|
||||||
{
|
{
|
||||||
guint16 seqnr, expected;
|
guint16 seqnr, expected;
|
||||||
RTPSourceStats *stats;
|
RTPSourceStats *stats;
|
||||||
|
@ -1023,6 +1024,7 @@ update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo)
|
||||||
src->curr_probation = src->probation;
|
src->curr_probation = src->probation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_receive) {
|
||||||
expected = src->stats.max_seq + 1;
|
expected = src->stats.max_seq + 1;
|
||||||
delta = gst_rtp_buffer_compare_seqnum (expected, seqnr);
|
delta = gst_rtp_buffer_compare_seqnum (expected, seqnr);
|
||||||
|
|
||||||
|
@ -1095,8 +1097,9 @@ update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo)
|
||||||
g_queue_clear (src->packets);
|
g_queue_clear (src->packets);
|
||||||
|
|
||||||
/* duplicate or reordered packet, will be filtered by jitterbuffer. */
|
/* duplicate or reordered packet, will be filtered by jitterbuffer. */
|
||||||
GST_WARNING ("duplicate or reordered packet (seqnr %u, expected %u)", seqnr,
|
GST_WARNING ("duplicate or reordered packet (seqnr %u, expected %u)",
|
||||||
expected);
|
seqnr, expected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
src->stats.octets_received += pinfo->payload_len;
|
src->stats.octets_received += pinfo->payload_len;
|
||||||
|
@ -1146,7 +1149,7 @@ rtp_source_process_rtp (RTPSource * src, RTPPacketInfo * pinfo)
|
||||||
g_return_val_if_fail (RTP_IS_SOURCE (src), GST_FLOW_ERROR);
|
g_return_val_if_fail (RTP_IS_SOURCE (src), GST_FLOW_ERROR);
|
||||||
g_return_val_if_fail (pinfo != NULL, GST_FLOW_ERROR);
|
g_return_val_if_fail (pinfo != NULL, GST_FLOW_ERROR);
|
||||||
|
|
||||||
if (!update_receiver_stats (src, pinfo))
|
if (!update_receiver_stats (src, pinfo, TRUE))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
/* the source that sent the packet must be a sender */
|
/* the source that sent the packet must be a sender */
|
||||||
|
@ -1217,7 +1220,7 @@ rtp_source_send_rtp (RTPSource * src, RTPPacketInfo * pinfo)
|
||||||
src->is_sender = TRUE;
|
src->is_sender = TRUE;
|
||||||
|
|
||||||
/* we are also a receiver of our packets */
|
/* we are also a receiver of our packets */
|
||||||
if (!update_receiver_stats (src, pinfo))
|
if (!update_receiver_stats (src, pinfo, FALSE))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
/* update stats for the SR */
|
/* update stats for the SR */
|
||||||
|
|
Loading…
Reference in a new issue