Commit dcdd2f9
authored
feat: enhance PeerConnectionManager with RTP traffic monitoring, disposal barrier, and pretty JSON logging (#864)
* refactor: extract PeerConnectionManager logic and implement disposal barrier
- Extract `RTCPeerConnection` lifecycle management (create, retrieve, dispose) into `PeerConnectionManager`.
- Implement `PeerConnectionFactory` interface to abstract native WebRTC calls for testability.
- Add "Disposal Barrier" mechanism to prevent race conditions during rapid call cycling.
- Remove inline `Completer` logic from `CallBloc`, simplifying the state machine.
- Add unit and integration tests covering race conditions, zombie connections, and timeouts.
* test: migrate PeerConnectionManager tests to integration_test binding
* refactor: make DefaultPeerConnectionFactory configurable and reuse default ICE config
* docs: clarify PeerConnectionManager factory responsibility for connection configuration
* test: update PeerConnectionManager unit tests for factory API and verify close on replacement
* fix: log dispose errors when cleaning up peer connections
* feat: add RTP traffic monitoring with scoped logging and wire into PeerConnectionManager
* refactor: simplify RTP monitor logging and adjust configuration notes
* refactor: clarify PeerConnectionManager variable naming and improve event logging
* docs: document non-awaited peer connection disposal and disposal barrier rationale
* refactor: simplify RTP traffic logging delegate configuration
* refactor: inject PeerConnectionManager from MainShell
* fix: align logPretty calls with new (data, tag) signature after rebase1 parent 69c35d1 commit dcdd2f9
9 files changed
Lines changed: 1486 additions & 216 deletions
File tree
- integration_test/features/call/utils
- lib
- app/router
- features/call
- bloc
- utils
- test/features/call/utils
Lines changed: 454 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
407 | 412 | | |
408 | 413 | | |
409 | 414 | | |
| |||
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| 447 | + | |
442 | 448 | | |
443 | 449 | | |
444 | 450 | | |
| |||
Large diffs are not rendered by default.
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments