Commit Graph

2053 Commits

Author SHA1 Message Date
adwpc
7069c5dc05 Fix register the same codec
Otherwise addTransceiverSDP will add duplicate codec sdp
2021-02-16 15:12:34 -08:00
Mindgamesnl
cad7b6d34e Don't cache SessionDescription during unmarshal
A user could use these across multiple interactions with the API. This
is confusing behavior because all their subsequent calls will be
ignored.

This reverts 3412dc6d95
v3.0.9
2021-02-16 12:43:11 -08:00
Sean DuBois
24f350c926 Safari's codec matching requires video be upcased
Upcase H264, VP8 and VP9. Otherwise Safari doesn't recognize those
codecs.

Resolves pion/example-webrtc-applications#89
v3.0.8
2021-02-11 14:05:04 -08:00
Sean DuBois
8902641f91 Fix MediaEngine Copy
Copy the entire API. Since the MediaEngine is a pointer that would
destroy the MediaEngine that is used by other PeerConnections

Relates to #1662
v3.0.7
2021-02-09 22:39:13 -08:00
Renovate Bot
5a6f532023 Update module pion/dtls/v2 to v2.0.5
Generated by renovateBot
2021-02-09 21:54:17 -08:00
Sean DuBois
c8b7aa386a Disable MediaEngine Copy by Default
If an API is shared between PeerConnections they would use the same
MediaEngine. A MediaEngine contains negotiated PayloadTypes so if the
PeerConnections were answering you would end up in invalid states.

Add DisableMediaEngineCopy to SettingEngine in case user needs old
behavior.

Resolves #1662
2021-02-09 21:31:57 -08:00
Sean DuBois
b5fa979c08 Don't enable RID/MID Extension Headers by default
Chrome is failing to signaling if the remote peer offers RID/MID so
disabling by default.

Relates to pion/example-webrtc-applications#87
v3.0.6
2021-02-09 14:01:10 -08:00
Pascal Benoit
22eea024a2 Fix codec matching in save-to-disk
Use equalFold. Codecs aren't case sensitive and a client could use
either
2021-02-04 08:51:48 -08:00
mission-liao
40eb352909 Add SetReadDeadline to RTPSender
ReadDeadline is supported by RTPReceiver but not RTPSender. This
commit attempts to provide similar method for RTPSender.

If SetReadDeadine is called with:
- an empty time.Time: it will clear all previous set deadline.
- a non-empty time.Time: it will abort all pending "ReadRTCP" calls if
  the specified time is up.
2021-02-04 10:16:44 +08:00
Cameron Elliott
06f9351bce Fix 2nd uint16 of rtpdump packet header
I wrote a tool to round trip output
from the original C lang rtpdump tool
this was the only problem I noticed.
In the original .rtp file, if rtp len is 100 the
first uint16 is 108 and the second uint16 is 100
before my change, this code will output 108/108
for both 'length' and 'plen' from spec
http://web3.cs.columbia.edu/irt/software/rtptools/
v3.0.5
2021-02-03 09:13:34 -08:00
Juliusz Chroboczek
16407672bd Avoid infinite loop in CreateOffer
If the local description keeps getting changed, or in case of a but
in Pion, CreateOffer never terminates, which could cause client software
to hang.  Set an arbitrary bound on the number of iterations.

Relates to #1656
2021-02-03 08:50:38 -08:00
Renovate Bot
285fb782ba Update golang.org/x/net commit hash to 5f4716e
Generated by renovateBot
2021-02-02 23:13:51 -08:00
Sean DuBois
cddf631a7f Fix rtp-to-web README
Linked to invalid commit SHA
2021-01-29 23:13:31 -08:00
Sean DuBois
daf27bd059 Remove SampleBuilder from rtp-to-webrtc
SampleBuilder isn't able to properly handle H264. We have multiple
issues and until resolved we shouldn't suggest it.

Relates to #1652
2021-01-29 23:10:04 -08:00
Juliusz Chroboczek
f4b3d98c1f Add IPv6 addresses to some tests
This only checks they are being parsed with no error, it doesn't
actually do anything useful with them.
2021-01-29 11:37:20 -08:00
Pion
bafb7f5524 Update CI configs to v0.4.20
Update lint scripts and CI configs.
2021-01-28 14:17:23 -08:00
Sean DuBois
bd5d8dea04 Simplify rtp-to-webrtc
Remove 'Waiting for RTP Packets'. This step was needed for
PayloadType/SSRC discovery before /v3. During the migration we forgot to
remove it.
2021-01-26 09:24:55 -08:00
Sean DuBois
db9915bdae Include Twitch/RTMP in rtp-forwarder
This is better then the example-webrtc-applications/twitch demo
2021-01-25 09:37:25 -08:00
Renovate Bot
687d915e05 Update golang.org/x/net commit hash to 6772e93
Generated by renovateBot
2021-01-17 21:55:14 -08:00
Renovate Bot
7c65ca8a63 Update module pion/ice/v2 to v2.0.15
Generated by renovateBot
2021-01-17 21:16:13 -08:00
Sean DuBois
91935c7d5b Use nanosecond instead of Millisecond precision
media.SampleBuilder would round time and was breaking audio samples that
required higher precision. This was seen only with alaw/ulaw that needed
microsecond precision. v3 had only been used with Opus so far.

Resolves #1640
v3.0.4
2021-01-17 16:02:55 -08:00
Renovate Bot
dc1d46404b Update module stretchr/testify to v1.7.0
Generated by renovateBot
2021-01-16 14:00:34 -08:00
Renovate Bot
5de557c444 Update module pion/sdp/v3 to v3.0.4
Generated by renovateBot
2021-01-16 13:54:55 -08:00
Renovate Bot
180a728fd1 Update dependency wrtc to v0.4.7
Generated by renovateBot
2021-01-14 13:07:47 -08:00
Sean DuBois
9439d820c5 Don't blindly forward RTP Packets in rtp-to-webrtc
ffmpeg produces packets that cause issues in Chromium. Instead of
validating/sanitizing just create a new packet.

Resolves #1514
2021-01-13 09:42:28 -08:00
Sean DuBois
52249252fb Modify packets in rtp-forwarder for easier usage
rtp-forwarder.sdp hardcodes the PayloadTypes 96 and 111. Before If the
browser doesn't use those values we expect the user to update the SDP.
The example has been updated to modify the packets to make it easier on
the user.
2021-01-13 09:29:34 -08:00
decanus
e3ec4024ba Expose NewSDPType
Allows a user to easily marshal a string to SDPType
2021-01-09 14:51:22 -08:00
OrlandoCo
6ef4c1bba8 Add buffer factory
Allow to configure a buffer factory on SettingEngine to provide
a custom buffer for RTP/RTCP
v3.0.3
2021-01-03 23:00:57 -05:00
Sean DuBois
c387312c60 Upgrade pion/interceptor to v0.0.9
Drops sync.Map usage and fixes leaks

Resolves #1622
v3.0.2
2021-01-02 23:00:42 -08:00
Juliusz Chroboczek
921608c26b JSON marshalling/unmarshalling for Configuration
Add UnmarshalJSON and MarshalJSON implementations and tests

Resolves #1616
2020-12-29 22:02:42 -08:00
mission-liao
1dedfd8c28 Refine SetReadDeadline behavior
- Refine RTPReceiver.SetReadDeadline behavior

  Instead of iterating over r.tracks, just calling r.tracks[0]
  directly. This behavior follows RTPReceiver.Read.

- Add RTPReceiver.SetReadDeadlineSimulcast

  Its fingerprint follows RTPReceiver.ReadSimulcast.

- Refine RTPReceiver.setRTPReadDeadline

  It will only timeout the RTP stream for the track makes the call.
2020-12-28 14:40:38 +08:00
Sean DuBois
398c363baf Add SetReadDeadline to RTPReceiver and TrackRemote
Previously, Reading RTP or RTCP packets from a peer
would block until a packet was received, or the
connection was terminated. This change allows you to
set a deadline, after which the read function will
return a timeout error and you can get on with other
things.

Resolves #1553
2020-12-26 09:41:45 -08:00
Sean DuBois
5a3d41ed77 Use proper values for application media section
Update from draft-ietf-mmusic-sctp-sdp
2020-12-23 23:44:23 -08:00
Juliusz Chroboczek
de913a99a8 Improve documentation of NewPeerConnection
It is important to mention that, unlike API.NewPeerConnection, this
registers default interceptors.
2020-12-23 17:41:20 -08:00
Lukas Herman
4ff9196a91 Fix a race condition in GatheringCompletePromise
It's possible that the ICE gathering is completed after the execution
goes to the else statement but before the setGatherCompleteHandler
finishes. In other words, it's possible that the handler misses the
event and block the caller forever.
v3.0.1
2020-12-22 20:19:42 -08:00
Renovate Bot
3fa9684bb2 Update module pion/srtp/v2 to v2.0.0
Generated by renovateBot
2020-12-22 10:15:45 +08:00
Sean DuBois
246e629d9a Use GatheringCompletePromise in examples/simulcast
We need to include ICE Candidates so we get bi-directional connectivity
checks
2020-12-18 20:02:03 -08:00
Pion
3297c36d8b Update CI configs to v0.4.19
Update lint scripts and CI configs.
2020-12-16 08:48:00 -08:00
Sean DuBois
af8f7d0e2c Update README.md for /v3
🥳
2020-12-14 23:26:25 -08:00
tarrencev
a54b74cdb7 Update pion/interceptor for NACKs
Generate + Respond interceptors
v3.0.0
2020-12-14 21:40:09 -08:00
pascal-ace
85ced4ad69 Update payloaderForCodec to be case insensitive
Remove sharp edge when creating sample track
2020-12-14 10:19:05 -08:00
Sean DuBois
f5875d9895 Add features matrix to the README
List most popular features/benefits of Pion WebRTC.

Resolves #1279

Co-authored-by: ZHENK <chengzhenyang@gmail.com>
2020-12-14 10:15:37 -08:00
Sean DuBois
67826b1914 Update Interceptors to use []byte based API
Also update test to assert Attributes get passed all the way through

Resolves pion/interceptor#14
2020-12-13 18:40:33 -08:00
Sean DuBois
ff1bc32221 Don't leak ICETransport routines
We didn't properly pass a context to the ICE Agent. We would leak
routines if closed while connecting.
2020-12-13 17:18:04 -08:00
Renovate Bot
d5ef32ca9b Update module pion/rtp to v1.6.2
Generated by renovateBot
2020-12-12 13:08:03 -08:00
ZHENK
3eb51d8a09 Pass nil candidate into pion/ice
Pass empty string candidate.Candidate into pion/ice to handle.

Co-authored-by: JooYoung <qkdlql@naver.com>

Resolves #1212
v3.0.0-beta.16
2020-12-09 16:17:17 -08:00
Renovate Bot
236b6c46bc Update module pion/ice/v2 to v2.0.14
Generated by renovateBot
2020-12-08 21:34:52 -08:00
Sean DuBois
63401a8837 Store Accepted Simulcast in routine
pion/srtp requires that all incoming streams are accepted. You
can't close if you have unaccepted streams. At the same time
storeSimulcastStream blocks on taking the DTLSTransport lock.

Move `storeSimulcastStream` into a routine so that all streams can
be accepted and aren't blocked on taking the DTLSTransport lock.

Resolves #1586
2020-12-08 18:33:48 -08:00
Sean DuBois
37658f4521 Remove QUIC Support
Chromium remove RtcQuicTransport. Removing our support as well since
interop with other WebRTC clients will never happen.

Resolves #1589
2020-12-08 18:30:10 -08:00
Sean DuBois
f431862acc Fix interceptorTrackLocalWriter.WriteRTP cast
Before we would panic if atomic was nil. Add a type assert as well so
that we handle gracefully.

Resolves #1585
2020-12-08 07:31:11 -08:00