[Bug 758719] Rtp retransmission broken / examples not working

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 14 15:04:27 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=758719

--- Comment #14 from Marcin Lewandowski <marcin at saepia.net> ---
I have made some tests and it seems that using C examples NACKs also do not
work properly.


For testing, I have disabled this piece of code in rtpsession.c, which tries to
limit rate of early RTCP packets:

    /*  RFC 4585 section 3.5.2 step 4a and
     *  RFC 4585 section 3.5.2 step 6 */
    allow_early = TRUE;
    if (sess->last_rtcp_check_time == sess->last_rtcp_send_time) {
      /* Last time we sent a full RTCP packet, we can now immediately
       * send an early one as allow_early was reset to TRUE */
      allow_early = TRUE;
    } else if (sess->last_rtcp_check_time + T_rr <= current_time + max_delay) {
      /* Last packet we sent was an early RTCP packet and more than
       * T_rr has passed since then, meaning we would have suppressed
       * a regular RTCP packet already and reset allow_early to TRUE */
      allow_early = TRUE;
    //
      /* We have to offset a bit as T_rr has not passed yet, but will before
       * max_delay */
      if (sess->last_rtcp_check_time + T_rr > current_time)
        offset = (sess->last_rtcp_check_time + T_rr) - current_time;
    } else {
      GST_DEBUG_OBJECT (sess,
          "can't allow early RTCP yet: last regular %" GST_TIME_FORMAT ", %"
          GST_TIME_FORMAT " + %" GST_TIME_FORMAT " > %" GST_TIME_FORMAT " + %"
          GST_TIME_FORMAT, GST_TIME_ARGS (sess->last_rtcp_send_time),
          GST_TIME_ARGS (sess->last_rtcp_check_time), GST_TIME_ARGS (T_rr),
          GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay));
    }
    //
    if (!allow_early) {
      /* Ignore the request a scheduled packet will be in time anyway */
      if (current_time + max_delay > sess->next_rtcp_check_time) {
        GST_LOG_OBJECT (sess,
            "next scheduled time is soon %" GST_TIME_FORMAT " + %"
GST_TIME_FORMAT
            " > %" GST_TIME_FORMAT, GST_TIME_ARGS (current_time),
            GST_TIME_ARGS (max_delay),
            GST_TIME_ARGS (sess->next_rtcp_check_time));
        ret = TRUE;
      } else {
        GST_LOG_OBJECT (sess,
            "can't allow early feedback and next scheduled time is too late %"
            GST_TIME_FORMAT " + %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT,
            GST_TIME_ARGS (current_time), GST_TIME_ARGS (max_delay),
            GST_TIME_ARGS (sess->next_rtcp_check_time));
        ret = FALSE;
      }
      goto end;
    }

And NACKs are transmitted properly at least with the C code, lost packets are
retransmitted but probably RFC is violated.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list