Files
livekit/go.mod
Raja Subramanian 2ec5f2bd3d Fixing edge cases in picture id munging. (#180)
* Fixing edge cases in picture id munging.

Changes

1. Check the RTP sequence number order before VP8 temporal layer
   filtering and use that ordering result while doing temporal
   layer filtering.

    In a sequence like below
       o Packet 10 -> Picture ID 10
       o Packet 11 -> missing
       o Packet 12 -> Picture ID 11
     it is not known if packet 11 will belong to Picture ID 10 or
     Picture ID 11. The problem becomes a lot more tricky if there
     is a burst loss and there is a larger hole in the picture id
     space also as a result.

     So, in the event of a packet loss, forward even if the current
     packet belongs to a layer that can be dropped. More comments
     in code.

2. Use result of sequence number ordering check while doing VP8 picture id munging.

3. When adding to missing picture id cache, have to include picture ids including
   both ends. As a picture can span multiple packets and it is not known which
   picture the packet belongs to, have to include both ends also in missing
   picture id cache in the event of a gap.

4. As a picture can span multiple packets, it is not possible to have a simple
   map of missing picture ids as an entry cannot be deleted if an out-of-order
   picture id is received. There may be more missing packets belonging to that
   picture id that is yet to be received.

   So, have to use an ordered map and truncate the map if it grows too large.

   Picked this for ordered map - https://github.com/elliotchance/orderedmap.
   Has a simple API, had the highest number of stars of all the ones I checked.
   And there are benchmarks.
   The author also wrote a medium post at https://medium.com/swlh/an-ordered-map-in-go-436634692381

   Another one which I looked at is - https://github.com/wk8/go-ordered-map.
   The author of that wrote at https://morioh.com/p/990229f32171 and has a
   bunch of other options at the end of that post (but does not include the
   one I picked above). None of those have that many stars.

Testing:
--------
- Set max temporal layers to 0 so that temporal filtering happens and run for
an hour on sample app.

* do not let padding packets through VP8

* Correct comment

* fix comment

* Review comments from Jie

* golang naming convention
2021-11-11 19:03:33 +05:30

49 lines
1.7 KiB
Modula-2

module github.com/livekit/livekit-server
go 1.15
require (
github.com/bep/debounce v1.2.0
github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/gammazero/deque v0.1.0
github.com/gammazero/workerpool v1.1.2
github.com/go-logr/logr v1.2.0
github.com/go-logr/zapr v1.1.0
github.com/go-redis/redis/v8 v8.11.3
github.com/google/subcommands v1.2.0 // indirect
github.com/google/wire v0.5.0
github.com/gorilla/websocket v1.4.2
github.com/hashicorp/golang-lru v0.5.4
github.com/jxskiss/base62 v0.0.0-20191017122030-4f11678b909b
github.com/livekit/protocol v0.10.1-0.20211110010924-91c31dabb096
github.com/magefile/mage v1.11.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0
github.com/mitchellh/go-homedir v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/pion/ice/v2 v2.1.13
github.com/pion/interceptor v0.1.0
github.com/pion/logging v0.2.2
github.com/pion/rtcp v1.2.8
github.com/pion/rtp v1.7.4
github.com/pion/sdp/v3 v3.0.4
github.com/pion/stun v0.3.5
github.com/pion/transport v0.12.3
github.com/pion/turn/v2 v2.0.5
github.com/pion/webrtc/v3 v3.1.8
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/rs/zerolog v1.26.0
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/thoas/go-funk v0.8.0
github.com/twitchtv/twirp v8.1.0+incompatible
github.com/urfave/cli/v2 v2.3.0
github.com/urfave/negroni v1.0.0
go.uber.org/zap v1.19.1
golang.org/x/mod v0.5.1 // indirect
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)