1. 20 Oct, 2019 1 commit
    • Håvard Graff's avatar
      rtpjitterbuffer: make sure not to drop packets based on skew · 44788e00
      Håvard Graff authored
      One of the jitterbuffers functions is to try and make sense of weird
      network behavior.
      It is quite unhelpful for the jitterbuffer to start dropping packets
      itself when what you are trying to achieve is better network resilience.
      In the case of a skew, this could often mean the sender has restarted
      in some fashion, and then dropping the very first buffer of this "new"
      stream could often mean missing valuable information, like in the case
      of video and I-frames.
      This patch simply reverts back to the old behavior, prior to gstreamer/gst-plugins-good@8d955fc3
      and includes the simplest test I could write to demonstrate the behavior,
      where a single packet arrives "perfectly", then a 50ms gap happens,
      and then two more packets arrive in perfect order after that.
      # Conflicts:
      #	tests/check/elements/rtpjitterbuffer.c
  2. 16 Oct, 2019 1 commit
  3. 14 Oct, 2019 2 commits
  4. 13 Oct, 2019 1 commit
  5. 12 Oct, 2019 1 commit
  6. 11 Oct, 2019 2 commits
  7. 05 Oct, 2019 1 commit
  8. 04 Oct, 2019 1 commit
    • Simon Arnling Bååth's avatar
      gstrtpjitterbuffer: Custom messages when dropping packets · 8173596e
      Simon Arnling Bååth authored
      This commit adds custom element messages for when gstrtpjitterbuffer
      drops an incoming rtp packets due to for example arriving too late.
      Applications can listen to these messages on the bus which enables
      actions to be taken when packets are dropped due to for example high
      network jitter.
      Two properties has been added, one to enable posting drop messages and
      one to set a minimum time between each message to enable throttling the
      posting of messages as high drop rates.
  9. 30 Sep, 2019 1 commit
  10. 28 Sep, 2019 1 commit
    • Olivier Crête's avatar
      rtpjitterbuffer: Cancel timers instead of just unlocking loop thread · a2459642
      Olivier Crête authored
      When the queue is full (and adding more packets would risk a seqnum
      roll-over), the best approach is to just start pushing out packets
      from the other side.  Just pushing out the packets results in the
      timers being left hanging with old seqnums, so it's safer to just
      execute them immediately in this case. It does limit the timer space
      to the time it takes to receiver about 32k packets, but without
      extended sequence number, this is the best RTP can do.
      This also results in the test no longer needed to have timeouts or
      timers as pushing packets in drives everything.
      Fixes #619
  11. 27 Sep, 2019 14 commits
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Optimize offset update · 4a9f4243
      Nicolas Dufresne authored
      As we are applying the same offset over all timers, there timer
      ordering won't change, so we can safely skip time-reordering.
    • Nicolas Dufresne's avatar
      rtptimerqueue: Optimize reschedule optations · af1c586c
      Nicolas Dufresne authored
      This basically add ability to choose between inserting from head, tail
      or in-place in order to try and minimize the distance to walk through in
      the timer queue. This removes an overhead we had seen on high drop rate.
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Fix a typo in comment · 1897c1fb
      Nicolas Dufresne authored
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Don't use stats timer on the timers queue · 9ebcadb3
      Nicolas Dufresne authored
      The timer passed to update_timers may be from the stats timer. At the
      moment, we could endup rescheduling (reusing) that timer onto the normal
      timer queue, unschedul it as if it was from the normal timer queue or
      duplicate it into the stats timer queue again. This was protected before
      as the with the fact the stats timer didn't have a valid idx.
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Update timers on ts-offset changes · 81bffb5e
      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 · d4c6c335
      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 · 36771b75
      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 · f5e3280d
      Nicolas Dufresne authored
      First iteration toward porting to the new timer queue.
    • Nicolas Dufresne's avatar
      rtptimerqueue: Consolidate a data structure for timers · 37742cd3
      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.
    • Nicolas Dufresne's avatar
      tests: jitterbuffer: Demacroify some helpers · a53ffb6e
      Nicolas Dufresne authored
      There is no reason for these to be macros anymore. This makes the
      test helper much more readable.
    • Nicolas Dufresne's avatar
      rtpjitterbuffer: Move item structure outside of the element · c917f11a
      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 · 9b706b62
      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.
    • Philipp Zabel's avatar
      v4l2: Add MPEG-2 profile and level support · 5c8d8723
      Philipp Zabel authored
      Add support for V4L2 MPEG-2 decoders reporting supported profiles and
  12. 25 Sep, 2019 2 commits
  13. 24 Sep, 2019 1 commit
  14. 23 Sep, 2019 1 commit
    • Matthew Waters's avatar
      build: fix werror build with newer gcc · 5ffd7333
      Matthew Waters authored
      In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                       from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/tag/tag.h:25,
                       from ../gst/isomp4/qtdemux.c:56:
      In function ‘qtdemux_inspect_transformation_matrix’,
          inlined from ‘qtdemux_parse_trak’ at ../gst/isomp4/qtdemux.c:10676:5,
          inlined from ‘qtdemux_parse_tree’ at ../gst/isomp4/qtdemux.c:14210:5:
      ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
        645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        646 |         (GObject *) (object), __VA_ARGS__);    \
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1062:35: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
       1062 | #define GST_DEBUG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
            |                                   ^~~~~~~~~~~~~~~~~
      ../gst/isomp4/qtdemux.c:10294:5: note: in expansion of macro ‘GST_DEBUG_OBJECT’
      10294 |     GST_DEBUG_OBJECT (qtdemux, "Transformation matrix rotation %s",
            |     ^~~~~~~~~~~~~~~~
      ../gst/isomp4/qtdemux.c: In function ‘qtdemux_parse_tree’:
      ../gst/isomp4/qtdemux.c:10294:64: note: format string is defined here
      10294 |     GST_DEBUG_OBJECT (qtdemux, "Transformation matrix rotation %s",
            |                                                                ^~
  15. 18 Sep, 2019 2 commits
  16. 10 Sep, 2019 2 commits
  17. 09 Sep, 2019 1 commit
    • Doug Nazar's avatar
      alpha: Fix one_over_kc calculation · 42dea672
      Doug Nazar authored
      On arm/aarch64, converting from float directly to unsigned int uses
      a different opcode and negative numbers result in 0. Cast to
      signed int first.
  18. 06 Sep, 2019 3 commits
  19. 02 Sep, 2019 2 commits