1. 23 Aug, 2019 2 commits
  2. 26 Jun, 2019 8 commits
    • Nicolas Dufresne's avatar
    • Nicolas Dufresne's avatar
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Update timers on ts-offset changes · 68e5c85e
      Nicolas Dufresne authored
      As the offset is already applied now, we need to update and reschedule
      all timers each time the offset is changed. I'm not sure who expect this
      to be retro-actively applied, but there was a unit test for it.
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: No need to wake the timer thread on head changes · 70efba63
      Nicolas Dufresne authored
      If the jitterbuffer head change, there is no need to systematically
      wakeup the timer thread. The timer thread will be waken up on if
      an earlier timeout has been pushed. This prevent some more spurious
      wakeup when the system is loaded. As a side effect, cranking the clock
      may set the clock at an earlier position.
    • Nicolas Dufresne's avatar
      rtpjittterbuffer: Port timers array to RtpTimerQueue · 104cfdff
      Nicolas Dufresne authored
      In this patch we now make use of the new RtpTimerQueue instead of the
      old GArray. This required a lot of changes all over the place, some of
      the important changes are that `timer->timeout` is no longer a PTS but
      the actual timeout. This was required to get the RtpTimerQueue sorting
      right. The applied offset is saved as `timer->offset`, this allow
      retreiving back the PTS when needed.
      The clockid updates only happens once per incoming packet. If the
      currently schedule timer is before the earliest timer in the queue, we
      no longer wakeup the thread. This way, if other timers get setup in the
      meantime, this will reduce the number of wakup.
      The timer loop code has been mostly rewritten, though the behaviour of
      running the lost timers first has been kept (even though there is no
      test to show what would be the side effect of doing this differently).
      Fixes #608
    • Nicolas Dufresne's avatar
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Port use the new RtpTimer structure · 4fc05902
      Nicolas Dufresne authored
      First iteration toward porting to the new timer queue.
    • Nicolas Dufresne's avatar
      rtptimerqueue: Consolidate a data structure for timers · c0373123
      Nicolas Dufresne authored
      Implement a single timer queue for all timers. The goal is to always use
      ordered queues for storing timers. This way, extracting timers for
      execution becomes O(1). This also allow separating the clock wait
      scheduling from the timer itself and ensure that we only wake up the
      timer thread when strictly needed.
      The knew data structure is still O(n) on insertions and reschedule,
      but we now use proximity optimization so that normal cases should be
      really fast. The GList structure is also embeded intot he RtpTimer
      structure to reduce the number of allocations.
  3. 21 Jun, 2019 9 commits
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Move item structure outside of the element · dff51aec
      Nicolas Dufresne authored
      This moves the RtpJitterBufferStructure type, alloc, free into
      rtpjitterbuffer.c/h implementation. jitterbuffer.c strictly rely on
      the fact this structure is compatible with GList, and so it make more
      sense to keep encapsulate it. Also, anything that could possibly
      reduce the amount of code in the element is a win.
      In order to support that move, a function pointer to free the data
      was added. This also allow making the free function option when
      flushing the jitterbuffer.
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Constify timer pointers where possible · bbcf3fe8
      Nicolas Dufresne authored
      This helps understanding which function modify the Timerdata
      and which one does not. This is not always obvious from thelper
      name considering recalculate_timer() does not.
    • Jan Schmidt's avatar
      rtpjitterbuffer: Clear clock master before unreffing · 4f1224fa
      Jan Schmidt authored
      Make sure to clear any master clock on the media_clock
      before unreffing it to release the timer callback that's
      updating the clock and keeping it reffed.
    • Mathieu Duponchelle's avatar
    • Mikhail Fludkov's avatar
      rtpjitterbuffer: late packets shouldn't affect PTS of the following packet · c85691eb
      Mikhail Fludkov authored
      If, say, a rtx-packet arrives really late, this can have a dramatic
      effect on the jitterbuffer clock-skew logic, having it being reset
      and losing track of the current dts-to-pts calculations, directly affecting
      the packets that arrive later.
      This is demonstrated in the test, where a RTX packet is pushed in really
      late, and without this patch the last packet will have its PTS affected
      by this, where as a late RTX packet should be redundant information, and
      not affect anything.
    • Mikhail Fludkov's avatar
    • Stian Selnes's avatar
      rtpjitterbuffer: Fix delay for EXPECTED timers added by gaps · 925681ee
      Stian Selnes authored
      This patch corrects the delay set on EXPECTED timers that are added when
      processing gaps. Previously the delay could be too small so that
      'timout + delay' was much less than 'now', causing the following retries
      to be scheduled too early. (They were sent earlier than
      rtx-retry-timeout after the previous timeout.)
    • Havard Graff's avatar
      rtpjitterbuffer: don't try and calculate packet-rate if seqnum are jumping · 5b9c6b70
      Havard Graff authored
      Turns out that the "big-gap"-logic of the jitterbuffer has been horribly
      For people using lost-events, an RTP-stream with a gap in sequencenumbers,
      would produce exactly that many lost-events immediately.
      So if your sequence-numbers jumped 20000, you would get 20000 lost-events
      in your pipeline...
      The test that looks after this logic "test_push_big_gap", basically
      incremented the DTS of the buffer equal to the gap that was introduced,
      so that in fact this would be more of a "large pause" test, than an
      actual gap/discontinuity in the sequencenumbers.
      Once the test was modified to not increment DTS (buffer arrival time) with
      a similar gap, all sorts of crazy started happening, including adding
      thousands of timers, and the logic that should have kicked in, the
      "handle_big_gap_buffer"-logic, was not called at all, why?
      Because the number max_dropout is calculated using the packet-rate, and
      the packet-rate logic would, in this particular test, report that
      the new packet rate was over 400000 packets per second!!!
      I believe the right fix is to don't try and update the packet-rate if
      there is any jumps in the sequence-numbers, and only do these calculations
      for nice, sequential streams.
    • Nicolas Dufresne's avatar
      rtpssrcdemux: Avoid taking streamlock out-of-band · 6e58ec81
      Nicolas Dufresne authored
      In this change we now protect the internal srcpads list using the
      stream lock and limit usage of the internal stream lock to
      preventing data flowing on the other src pad type while creating
      and signalling the new pad.
      This fixes a deadlock with RTPBin shutdown lock. These two locks would
      end up being taken in two different order, which caused a deadlock. More
      generally, we should not rely on a streamlock when handling out-of-band
      data, so as a side effect, we should not take a stream lock when
      iterating internal links.
  4. 27 May, 2019 2 commits
    • Nicolas Dufresne's avatar
      rtpsession: Always keep at least one NACK on early RTCP · 6aaa4400
      Nicolas Dufresne authored
      We recently added code to remove outdate NACK to avoid using bandwidth
      for packet that have no chance of arriving on time. Though, this had a
      side effect, which is that it was to get an early RTCP packet with no
      feedback into it. This was pretty useless but also had a side effect,
      which is that the RTX RTT value would never be updated. So we we stared
      having late RTX request due to high RTT, we'd never manage to recover.
      This fixes the regression by making sure we keep at least one NACK in
      this situation. This is really light on the bandwidth and allow for
      quick recover after the RTT have spiked higher then the jitterbuffer
    • Nicolas Dufresne's avatar
      rtpsession: Call on-new-ssrc earlier · 55eed9a8
      Nicolas Dufresne authored
      Right now, we may call on-new-ssrc after we have processed the first
      RTP packet. This prevents properly configuring the source as some
      property like "probation" are copied internally for use as a
      decreasing counter. For this specific property, it prevents the
      application from disabling probation on auxiliary sparse stream.
      Probation is harmful on sparse streams since the probation algorithm
      assume frequent and contiguous RTP packets.
  5. 02 May, 2019 1 commit
  6. 18 Apr, 2019 4 commits
  7. 17 Apr, 2019 1 commit
  8. 16 Apr, 2019 1 commit
  9. 10 Apr, 2019 2 commits
  10. 09 Apr, 2019 6 commits
    • Tim-Philipp Müller's avatar
      rtpulpfecdec,enc: unbreak plugin gtk-doc build in autotools · c6c3bed0
      Tim-Philipp Müller authored
      Fix doc chunks to not use that syntax for links that have the
      url as description, it will be put verbatim into the xml/*.xml
      file and then the expat parser will throw a syntax error like:
        File "../../common/mangle-db.py", line 71, in <module>
        File "../../common/mangle-db.py", line 69, in main
          patch (details.replace("-details", ""), os.path.basename(details))
        File "../../common/mangle-db.py", line 20, in patch
          doc = xml.dom.minidom.parse(related)
        File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
          return expatbuilder.parse(file)
        File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
          result = builder.parseFile(fp)
        File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
          parser.Parse(buffer, 0)
      xml.parsers.expat.ExpatError: not well-formed (invalid token): line 84, column 7
    • Antonio Ospite's avatar
      rtpvrawpay: preserve GST_BUFFER_FLAG_DISCONT on the first outputted buffer · 61c1385c
      Antonio Ospite authored
      If the incoming frame buffer has GST_BUFFER_FLAG_DISCONT set this should
      be preserved and set for the first output buffer too, like other
      payloaders do.
      Spotted with gst-validate-1.0 when adding integration tests for
      rtpsession, a minimal test to reproduce the issue is:
      $ gst-validate-1.0 videotestsrc num-buffers=1 ! rtpvrawpay ! identity ! fakesink
      Starting pipeline
      Pipeline started
         warning : Buffer didn't have expected DISCONT flag333 speed: 1.000000 />
                   Detected on <identity0:sink>
                   Detected on <identity0:src>
                   Detected on <fakesink0:sink>
                   Description : Buffers after SEGMENT and FLUSH must have a DISCONT flag
      Issues found: 1
      =======> Test PASSED (Return value: 0)
    • Olivier Crête's avatar
    • Olivier Crête's avatar
      rtpred*: Add example pipelines · 1bd81d3d
      Olivier Crête authored
    • Olivier Crête's avatar
      rtpulpfec*: Improve documentation · 11f30181
      Olivier Crête authored
    • Olivier Crête's avatar
      rtpstorage + rtpulpfecdec: Get the storage using a query as fallback · 070eacdd
      Olivier Crête authored
      This allows it to be used using gst-launch for easier testing.
  11. 08 Apr, 2019 1 commit
    • Dan Kegel's avatar
      osxvideo: fix mac os 10.14 build · dfe1f6d8
      Dan Kegel authored
      lockFocusIfCanDraw is deprecated in mac os 10.14.  Apple suggests a
      different way to do what that does, but for now, just suppress the deprecation.
      There's no way to disable just that deprecation, so shut them all down.
      OpenGL is also deprecated in mac os 10.14.  There is a gentle way to
      turn off just those deprecations (GL_SILENCE_DEPRECATION), but since
      this commit turns them all off, that's moot.
  12. 07 Apr, 2019 1 commit
  13. 05 Apr, 2019 2 commits