Commit Graph
96 Commits
Author SHA1 Message Date
Raja Subramanian 41147e924f Misc clean up (#1099) 2022-10-19 05:02:41 +05:30
cnderrauber 8fd3e8fe2d Support track level stereo and red setting (#1086)
* Support track level stereo and red setting

* fix test client
2022-10-17 10:48:11 +08:00
David Zhao 1019faa0e6 Cleanup pass through logging (#1073)
* added filtering for noisy pion logs
* demoted some logs to debug
* using consistent trackID / participant / publisher / subscriber terminology
* removed ice candidate log lines, deferring to combined log
2022-10-06 23:48:37 -07:00
cnderrauber a421ab8d2b enable stereo opus (#1013) 2022-09-16 12:36:02 +08:00
cnderrauber f1915feb1a keep mid unchange after migration for subscribed track (#995) 2022-09-09 17:39:09 +08:00
Raja Subramanian d13c4be923 Close subscriber PC after a wait to aid in migration. (#979)
* Close subscriber PC after a wait to aid in migration.

* mage generate
2022-09-03 01:16:51 +05:30
David Zhao 69bf31944e Send connection type to telemetry (#964)
* Send connection type to telemetry

When connected, determine how the participant's primary connection is
connected and report it in ParticipantActive event.

* address feedback

* fixed case where prflx is reported instead of relay

* incorporate comments
2022-08-29 23:17:13 -07:00
Raja Subramanian 4217f198d6 Have to go through the full ICE restart checks after gatheting finishes. (#963) 2022-08-29 09:45:38 +05:30
Raja Subramanian 06a46d5de0 Replace Target with params to indicate direction (#955)
* Replace Target with params to indicate direction

* Add missed send answer call
2022-08-25 08:33:06 +05:30
cnderrauber 1350400c3a fallback to turn over tls when tcp short connection happen (#950)
* fallback to tls when tcp failed

* go mod

* magefile
2022-08-24 20:42:56 +08:00
Raja Subramanian aaa3a5b46e Transport restructure (#944)
* WIP commit

* WIP commit

* fix copy pasta

* setting PC with previous answer has to happen synchronously

* static check

* WIP commit

* WIP commit

* fixing transport tests

* fix tests and clean up

* minor renaming

* FIx test race

* log event when channel is full
2022-08-24 14:31:45 +05:30
cnderrauber a118d21af0 add red codec for opus (#938)
* opus/red codec

* panic

* forward red track to nonred subscriber

* config

* clean code

* solve comments
2022-08-22 12:32:27 +08:00
Raja Subramanian fae3857800 Log errors on sending offer/answer (#933)
* Log errors on sending offer/answer

* minor clean up

* remove unneeded logs

* fix test
2022-08-19 17:54:27 +05:30
Raja Subramanian 0cd9c87dc9 Misc clean up (#931)
* Start RTCP workers after peer connection connects

* Move more things into transport module

* Start RTCP workers only on connected

* Test needs PeerConnection() method

* adjust comment
2022-08-19 11:49:12 +05:30
cnderrauber f819dcb63d use protocol/sdp for sdp process (#926) 2022-08-17 16:12:33 +08:00
Raja Subramanian 3f53dea223 Log ICE candidates on peer connection established to get remote also (#922) 2022-08-16 15:31:16 +05:30
David Zhao 1d199d1efa Populate network field when set by clients (#919) 2022-08-15 23:28:15 -07:00
Raja Subramanian 6acd2944bc As "remote" is a logging context key already, use a different name. (#910) 2022-08-12 23:51:20 +05:30
Raja Subramanian b7c44f1ecd Move reset of local description sent on ICE restart internally (#909) 2022-08-12 13:04:06 +05:30
Raja Subramanian 692c4d804f Cache local candidates till local description is sent (#908) 2022-08-12 12:31:26 +05:30
Raja Subramanian 641f8d4519 Transport refactor (#907)
* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* Clean up

* fix tests

* debug logs

* Remove comments

* Fix data channel creation on migration and clean up unused stuff

* log offer/answer send/receive
2022-08-12 11:20:54 +05:30
Raja Subramanian 49cf15cdca Fix filtering candidates (#901)
* Filter candidate after setting description

* comment

* Fix filtering candidates

- For offer/answer from remote, do filtering before setting remote
  description so that Pion does not see filtered candidates
- For offer/answer originating from server, do filtering after setting
  local description (comments in code) so that remote side does not
  see filtered candidates.
- Make logging a little consistent and use right context.

* Comment

* TCP fallback config and UT (broken now)

* log SDP only when preferring TCP

* Remove TCP fallback test attempt
2022-08-10 10:42:46 +05:30
Raja Subramanian 4ec7e71b2d Logging negotiation as we are seeing some errors with filtering candi… (#900) 2022-08-09 16:57:15 +05:30
cnderrauber 1d2bca373b queue restart ice offer while publisher pc gathering ice (#895)
* queue restart ice offer while publisher pc gathering ice

* fix test case fail
2022-08-08 15:40:45 +08:00
Raja Subramanian 4703e30047 Use constants (#875) 2022-08-06 00:15:00 +05:30
Raja Subramanian ab4d57ab5b Filter out UDP candidates from SDP if allowing only TCP. (#874)
* Filter out UDP candidates from SDP if allowing only TCP.

* Do it properly

* static check

* Adding TCP candidates to test
2022-08-05 23:11:07 +05:30
Raja Subramanian 6b6f61b4df Adding transport fallback (#866)
* Adding transport fallback

Commented out for now so that we can gather some data.

* Promoting a few logs to info
2022-08-03 23:03:10 +05:30
Raja Subramanian 3c9a2cc66a Log selected ICE candidate pair (#865)
* Log selected ICE candidate pair

* simplify
2022-08-03 13:31:37 +05:30
Raja Subramanian a393d64ccc Do not re-use transceiver when negotiation is pending. (#862) 2022-07-31 10:50:55 +05:30
David Zhao 53f51c8cb0 Logging cleanup (#843)
* Logging cleanup

Changes log levels to better match significance

* fix lock
2022-07-21 00:39:49 -07:00
Raja Subramanian fbb1f9fc80 Move subscribe/unsubscribe queue to participant. (#813)
* Move subscribe/unsubscribe queue to participant.

As subscribe/unsubscribe operation can come from both
local media track or remote media track, participant
needs to have it.

* Remove comment

* Stop reneg timer on close

* address comments
2022-07-06 17:27:32 +05:30
cnderrauber f17ed9b925 refine negotiation process (#807)
* refine negotiation process

* not restart during ice gathering

* fix test case
2022-07-04 17:11:09 +08:00
Raja Subramanian e7033a23c0 Recover from retry on ICE restart (#798) 2022-07-02 11:46:28 +05:30
cnderrauber 651d2aee4d fix datachannel to same postion as previous negotiate (#765) 2022-06-17 18:28:57 +08:00
cnderrauber 6ba034feae shorten the time cost for subscriber get media tracks (#747)
* set DownTrack's initial codec to first codec of potential codecs

* faststart on subscribe
2022-06-02 10:00:42 +08:00
David Zhao 57e2321a18 Expose Participant.IsPublisher to differentiate pubs from subs (#643) 2022-04-21 22:15:01 -07:00
David Colburn 0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -07:00
cnderrauber 61655c6ff0 fix firefox reconnect with ice-lite enabled (#565) 2022-03-24 17:38:44 +08:00
Raja Subramanian f209e9319a Reset channel observer in resetState (#449)
* Reset channel observer in resetState

* Spelling fix
2022-02-20 20:52:17 +05:30
Raja Subramanian f3a6f58006 Use correct publisher id in stream state update (#432) 2022-02-11 12:09:48 +05:30
Raja Subramanian 941cac8dfc set DTLS retransmit interval to 100 ms (#414) 2022-02-07 23:43:41 -08:00
David Zhao e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
Raja Subramanian 7f2a5ae036 latest DTLS to fix long delay connections (#405) 2022-02-05 13:14:06 +05:30
Raja Subramanian 9c3794144e Force DTLS role client for the simulated client side peer connection (#403)
* Force DTLE role client for the simulated client side peer connection
during migration.

Without that, with remote side being ice-lite (i. e. server offer
is subscriber peer connection), pion chooses the server DTLS role
and both side end up being servers.

* pion/webrtc -> 3.1.21

* remove local reference

* Use setup from previous answer

* more comments
2022-02-04 23:11:27 +05:30
David Colburn 7bbd238188 clean up logs and imports (#400) 2022-02-03 14:20:19 -07:00
David Zhaoandboks1971 a8d43aab67 Uses IceLite only for protocol 6 clients (#397)
* Update to Pion v3.1.20, with fixes DTLS role ambiguity

* Gate ice-lite on protocol version

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2022-02-02 21:16:08 -08:00
Raja Subramanian ede39fe87f Disable SRTP replay protection (#396) 2022-02-02 16:31:07 +05:30
Raja Subramanian 0178a004dd Compile in send-side bandwidth estimation. (#351)
Still not using it. But, now that Pion has merged the initial
version of GCC (Google Congestion Control) for send side bandwidth
estimation, we can integrate it.

We will enable once we have tested and feel comfortable.
2022-01-19 22:36:41 +05:30
David Colburn 5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
David Zhao c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00