* Consolidating PLI throttle
Use the throttler in `sfu.WebRTCReceiver`.
Does change shape of config object.
* Move PLIThrottleConfig to sfu.WebRTCReceiver
* fix test compile
* Cleaning up unused stuff
* readability improvement
RTCP messages are going through two channel hops now.
Maybe we don't need that anymore now that the original
problem is diagnosed. But, pushing all RTCP via
the callbackOps channel for now to make it consistent.
The SRTP replay detection was disabled recently.
But, they were effectively getting dropped in `sfu.bucket`.
Doing two things with RTX packets in this PR
1. Update stats - add to packet count and bytes
2. Process header extension - to process TWCC
* WIP commit
* fix test
* More clean up
* cast to right size
* use local variable
* set a default RTT
* Do not log RTX, although need to figure out source of RTX
* fix test
* Cleaning/simplifying some buffer bits
1. NACKs are always inserted in order. So, get rid of
bunch of out-of-order handling in there and simplify.
2. For now, removing triggering a key frame from NACKs.
Let subs drive it.
3. Move to 16-bit sequence numbers except for receiver
report handling. Simplify bits about unwrapping sequence
number on all packets.
4. Remove unused code.
* remove unused field
* Use protocol friendly StreamedTracksUpdate
* WIP commit
* Stream allocator update
* subtract the requested bandwidth as delta from Allocate could be adding to bandwidth
* Calculate delta correctly
* correct comment
* Simplify eventCh per David's suggestion
* WIP branch to hash out down stream allocator.
* Plug more bits of stream allocator
* update protocol
* remove SignalRequest_Simulcast (#154)
* Plug more bits of stream allocator
* Handle simulcast track available layers change
* WIP branch to hash out down stream allocator.
* Plug more bits of stream allocator
* Handle simulcast track available layers change
* Adopt signature of call to AdjustAllocation
* Move StreamAllocator to PCTransport and allocate only for subscriber.
* Move streamallocator to ion-sfu
* Start/Stop of streamallocator
* Use StreamAllocator for subscriber bandwidth management.
* Do not allocate in ADD_TRACK
* Set payload in constructor
* - Add some logging
- Protocol message to notify clients of paused/resumed streams
* named return
* oops correct sense of isPausing
* Update pkg/sfu/streamallocator.go
Committing David's suggestion.
Co-authored-by: David Zhao <david@davidzhao.com>
* - Log estimate changes/commits.
- Catch more than epsilon change oscillating for long time.
Co-authored-by: David Colburn <xero73@gmail.com>
Co-authored-by: David Zhao <david@davidzhao.com>
* Handle multiple codecs in renegotiation
update pion to v3.1.9 for answer same order of codec as publisher.
register enable codecs in subscriber peerconnectin created.
add codec parameter to buffer.bind
buffer should use the codec of TrackRemote as it's codec mime.
sent h264blankframe when DownTrack closing
* Separate from ion-sfu
changes:
1. extract pkg/buffer, twcc, sfu, relay, stats, logger
2. to solve cycle import, move ion-sfu/pkg/logger to pkg/sfu/logger
3. replace pion/ion-sfu => ./
reason: will change import pion/ion-sfu/pkg/* to livekit-server/pkg/*
after this pr merged. Just not change any code in this pr, because it
will confused with the separate code from ion-sfu in review.
* Move code from ion-sfu to pkg/sfu
* fix build error for resovle conflict
Co-authored-by: cnderrauber <zengjie9004@gmail.com>