Commit Graph

17 Commits

Author SHA1 Message Date
Sean DuBois
89042ee5f6 Don't consider simulcast for undeclared SSRC
If we have a media section with no SSRC we would fire an OnTrack. This
code now properly ignores a MediaSection that has a rid attribute.

Resolves #1808
2021-08-24 17:02:21 -04:00
digitalix
f524fea32a Implement SetCodecPreferences in RTPTransceiver
This allows to set supported codecs per transceiver.

Resolves #1847
2021-06-28 10:54:31 -04:00
tarrencev
5ee9a316a9 Export mime types
Export mime types from media enginer for matching
2020-12-06 00:58:06 -05:00
Sean DuBois
7edfb701e0 New Track API
The Pion WebRTC API has been dramatically redesigned. The design docs
are located here [0]

You can also read the release notes [1] on how to migrate your
application.

[0] https://github.com/pion/webrtc-v3-design
[1] https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0
2020-11-15 09:20:47 -08:00
Sean DuBois
2155a7d703 Move candidate parsing to pion/ice
Instead of having logic in pion/webrtc and pion/sdp move all logic to
pion/ice. Users of pion/ice don't want to import these packages to use
basic pion/ice functionality.
2020-09-13 00:05:09 -07:00
Jason
6ee528d349 Add Simulcast support
Resolves #1016
2020-07-24 01:01:43 -07:00
Jason
58956684f8 Implement answering to RIDs
When responding to a remote description
with RIDs we now properly respond
2020-07-10 15:14:44 -07:00
Sean DuBois
ef1d5a4a8b Add extmap support
Extmaps are configured via the SettingEngine. This allows a user
to set arbitrary values, and when answering ids and entries are
properly excluded.

Co-authored-by: Gabor Pongracz <gabor.pongracz@proemergotech.com>
2020-07-03 01:01:56 -07:00
Woodrow Douglass
baf14a9af4 Media Level Fingerprints Configuration Option
This commit adds an option to put DTLS Fingerprint specification
at the media description level rather then the session description
level. This enhances compatibility with some 3rd party webrtc
implementations (notably Kurento).
2020-06-30 01:37:15 -07:00
Sean DuBois
3a60d8dae8 Support ICE values at session level
Also add tests to assert we don't have conflicting values. This could
have happened before but we never tested for it.
2020-06-10 00:17:06 -07:00
Sean DuBois
f78334d9d4 Only start SCTP if RemoteDescription requests
Relates to #346
2020-05-18 00:05:40 -07:00
Simone Gotti
9cd89ddc00 Start the right receiver
From PR #1158 during negotiation every required transceiver is assigned
to a specific media section (using the media section mid value).

The same should be done when starting receivers. We should start the
receiver assigned to the media section of that track.
2020-05-06 19:37:45 +02:00
Sean DuBois
82ad5e6b5f Refactor TestTrackDetailsFromSDP
Move asserts that direction is taken into account when ssrc is found
into distinct test.
2020-04-21 01:25:32 -07:00
Jerko Steiner
eb2cdd6be0 Filter out non-sending incoming tracks
This modification will only keep incoming tracks from media sections
with `a=sendrecv` or `a=sendonly` attributes. This modification is not
necessary for pion-to-pion peer connections, but for browser-to-pion
connections using Unified Plan.

Background:

When a `RTCPeerConnection#removeTrack()` is called in the browser and
the connection is renegotiated, the browser (tested in Firefox 75.0)
will change the media section attribute to `a=recvonly` from
`a=sendrecv`, or `a=inactive` from `a=sendonly`, but will keep the same
`a=ssrc:<ssrc>` associated with the same media (mid) section.

Previously, when a remote track obtained with Pion's `OnTrack()` handler
was being read from, and this remote track was later removed in the
browser, the track's `Read()` method would never return `io.EOF` (unless
the peer connection was closed).

With this commit, the `trackDetailsFromSDP` function will only include
remote track details whose media section has `a=sendonly` or
`a=sendrecv` attributes, and previously existing logic will ensure that
a receiver for that specific ssrc is stopped, so that
`webrtc.Track#Read()` method returns `io.EOF`.
2020-04-21 01:25:32 -07:00
Jerko Steiner
729613095d Read "a=msid:<track_id> <track_label>"
This format is used in SDP answers by Unified plan in Firefox and
Chrome.
2020-04-14 08:42:00 +02:00
Simon Eisenmann
d41ef0b6b4 Ignore rtx ssrc FID group when extracting tracks
If the remote description contains rtx information via a `ssrc-group`,
the extra `ssrc` entries must be ignored to ensure thats no receiver
is added for them.

This can solve issues like `Incoming unhandled RTP ssrc(1858531374)` if
those are caused by a wrong receiver getting started for the rtx ssrc
but not for the track ssrc, based on the ssrc/transceiver oder in the
remote description.

Until rtx is properly supported, this change fixes the imediate issue
that some remote streams are randomly not received because of a remotes
rtx information.

Fixes: #1081
Related: #1083
2020-03-22 00:48:30 -07:00
Sean DuBois
00ba9ab52e Split ICE and DTLS related SDP parsing out
Move this stuff out of SetRemoteDescription so it will be easier to test

Relates to #1023
2020-02-14 18:53:19 -08:00