Commit Graph

11 Commits

Author SHA1 Message Date
Raja Subramanian 8ed193b231 StreamAllocator - tracking more things (#1652)
* WIP commit

* Add a probe cluster mode

* better variable naming

* fix units

* WIP commit

* WIP commit

* WIP commit

* new file

* WIP commit

* Maintain history of a few things

* correct signal

* fix typo

* WIP commmit

* gofmt

* rate not sum

* adjust edges of rate monitor

* fmt

* remove debug
2023-04-25 07:31:22 +05:30
Raja Subramanian 93604d2415 A couple of stream allocator tweaks (#1628)
* A coupke of stream allocator tweaks

- Do not overshoot on catch up. It so happens that during probe
  the next higher layer is at some bit rate which is much lower
  than normal bit rate for that layer. But, by the time the probe
  ends, publisher has climbed up to normal bit rate.
  So, the probe goal although achieved is not enough.
  Allowing overshoot latches on the next layer which might be more
  than the channel capacity.
- Use a collapse window to record values in case of a only one
  or two changes in an evaluation window. Some times it happens
  that the estimate falls once or twice and stays there. By collapsing
  repeated values, it could be a long time before that fall in estimate
  is processed. Introduce a collapse window and record duplicate value
  if a value was not recorded for collapse window duration. This allows
  delayed processing of those isolated falls in estimate.

* minor clean up

* add a probe max rate

* fix max

* use max of committed, expected for max limiting

* have to probe at goal
2023-04-18 11:49:51 +05:30
Raja Subramanian 5b34d754e0 Safe access of sequencer (#1625)
* log some NACKs

* split out NACK tracker

* remove debug

* debug

* Sequencer safety

* Clean up
2023-04-17 13:02:24 +05:30
Raja Subramanian 5d187523fa Refactor NACK tracking in stream allocator (#1623)
* log some NACKs

* split out NACK tracker

* remove debug
2023-04-17 10:16:12 +05:30
Raja Subramanian e75b73af52 Use last received if lower. (#1616)
When detecting congestion based on loss, it is possible that
the loss based signal triggers earlier and the estimate based
signal is lagging. In those cases, check against last received
estimate and if that is lower than loss based throttling, use that.

Without this, it was possible that the current usage high.
Loss based throttling may not dial things back far enough to pause
the stream. Ideally, congestion should hit again and it should be dialled
down further and eventually pause, but there are situations it never
dials back far enough to pause.
2023-04-15 13:07:47 +05:30
Raja Subramanian d2bf8f0ba1 Support simulating subscriber bandwidth. (#1609)
* Support simualting subscriber bandwidth.

When non-zero, a full allocation is triggered.
Also, probes are stopped.

When set to zero, normal probing mechanism should catch up.

Adding `allowPause` override which can be a connection option.

* fix log

* allowPause in participant params
2023-04-13 13:59:24 +05:30
Raja Subramanian c56e37f3fe Fix VP9 stutter in non-DD and some other misc changes (#1595)
* WIP commit

* WIP commit

* clean up

* remove todo

* fix test
2023-04-10 12:31:07 +05:30
Raja Subramanian 4969b57c09 Chaging VideoLayers -> VideoLayer (#1591)
There was mixed used. It is a struct. So, it is a singular.
Change all the places I could find. There may be more, but can be
changed when spotted.
2023-04-08 12:39:02 +05:30
Raja Subramanian e32eaa451f Refactor video layer selector (#1588)
* WIP commit

* WIP commit

* fix test

* FPS for VP9

* WIP commit

* test changes

* WIP commit

* h264

* codec munger

* forwarder state

* clean up a bit

* dd interface

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* more TODO notes

* overshoot interface

* clean up

* clean up isTemporalSupported

* wait for key frame to resume

* clean up VP8 payload descriptor stuff

* temporal layer selector

* comment out vp9 and av1

* space

* fix test compile

* append bytes

* fix tests

* fix test
2023-04-08 10:57:57 +05:30
Raja Subramanian 2c439b3063 Fix sequence number offset on packet drop (#1556) 2023-03-29 07:43:28 +05:30
Raja Subramanian f63962c2cc Pure code movement (#1552) 2023-03-26 23:13:17 +05:30