Conversation
|
The interceptor now supports this new jitter buffer, supports multiple tracks/streams, and accepts options for building the jitter buffer. I've added the #255 fix since it was stopping me from testing. |
|
Let me do some performance regression tests but this looks good |
974193e to
d087f56
Compare
|
I have a branch that changes the data structure underneath for jb from a priority queue to a tree, based on feedback from @at-wat with my original port of SampleBuilder to jitterbuffer. This PR would allocate a lot more (~24% more in the perf tests) and is slower by ~68%. I'll do some profiling to see where the issues may be and hopefully we can reduce the memory allocations. |
|
Thank you for checking this PR, Rob. The data structure I've used (ring buffer) is dictated by the data structure the internal The performance degradation is due to using But as I understand There is trade off, and this is the result of using I am happy to keep working on this PR if you think it is worth it after the optimization, I will push a commit later. |
Description
Use rtpbuffer for the jitter buffer (as suggested by Sean in #278). I am using a ring buffer (as rtpbuffer packets can be overwritten any time) for the playback buffer and it accepts retainable packets too so it uses the buffer pool too.
I tried to keep the behavior of the API as 1:1 as possible, but the differences are:
minStartCount).Popdo move theplayoutHeadto that sequance number.Working on: receiver interceptor, unit tests for the ring buffer, and a NoCopy option.