Commit Graph

2146 Commits

Author SHA1 Message Date
Stephan Rotolante
2d892b5d68 Fix missing RTX codec using SetCodecPreferences 2025-03-05 19:57:44 -05:00
Sean DuBois
e4ff415b2b Support DataChannel messages larger then MaxUint16
SCTP now internally can handle larger messages

Resolves #2712
v4.0.13
2025-03-04 18:22:14 -08:00
Joe Turki
98a0025083 Add support for AV1 and VP9 to play from disk v4.0.12 2025-03-02 10:26:32 +02:00
Joe Turki
8f8c2322fb Refactor Ivfwriter.WriteRTP implemention
Break the WriteRTP function into smaller functions for each codec type.
2025-03-01 23:52:40 +02:00
Joe Turki
fd7fe3fbce Fix AV1 IVF writer using RTP depacketizer
1. Replaced the OBU reader with the AV1 depacketizer to actually handle
RTP input.
2. Now explicitly constructing OBUTemporalDelimiter to ensure proper
separation of frames.
2025-03-01 23:36:07 +02:00
Joe Turki
38fdb70355 Fix save to disk examples 2025-03-01 22:52:56 +02:00
Joe Turki
bdfe07a07c Move ErrCodecAlreadyRegistered to errors.go 2025-03-01 22:18:16 +02:00
Manish
19789447bb Return error if payload type exists in codecs list 2025-03-01 22:02:48 +02:00
Joe Turki
a80256e99f Update pion/rtp to v1.8.12 2025-03-01 21:54:36 +02:00
renovate[bot]
61162f3085 Update module golang.org/x/net to v0.35.0 (#3046)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| golang.org/x/net | `v0.34.0` -> `v0.35.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.34.0/v0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.34.0/v0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - "on the first day of the month" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pion/webrtc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-01 19:51:32 +00:00
cnderrauber
dae0af938b Add Req/Res count/time to candidate stats (#3043)
See https://github.com/pion/ice/pull/763
v4.0.11
2025-02-27 13:37:55 +08:00
cnderrauber
44062a7a78 Missed Done when collecting ice stats (#3040)
Missed Done when error in collecting
2025-02-24 18:19:59 +08:00
renovate[bot]
9f3df089ac Update module github.com/pion/sctp to v1.8.36 (#3039)
Generated by renovate
2025-02-18 08:02:11 -05:00
Sean DuBois
70f0211065 Add GetRemoteParameters to ICETransport
Implementing to match webrtc-pc
v4.0.10
2025-02-17 13:40:12 -05:00
Alessandro Ros
969ab684e3 Fix matching codecs with different rate or channels
Currently codecs are matched regardless of the clock
rate and the channel count, and this makes impossible to fully support
codecs that might have a clock rate or channel count different than the
default one, in particular LPCM, PCMU, PCMA and multiopus (the last one
is a custom Opus variant present in the Chrome source code to support
multichannel Opus).

For instance, let's suppose a peer (receiver) wants to receive an audio
track encoded with LPCM, 48khz sample rate and 2 channels. This receiver
doesn't know the audio codec yet, therefore it advertises all supported
sample rates in the SDP:

```
LPCM/44100
LPCM/48000
LPCM/44100/2
LPCM/48000/2
```

The other peer (sender) receives the SDP, but since the clock rate and
channel count are not taken into consideration when matching codecs, the
sender codec `LPCM/48000/2` is wrongly associated with the receiver
codec `LPCM/44100`. The result is that the audio track cannot be decoded
correctly from the receiver side.

This patch fixes the issue and has been running smoothly in MediaMTX for
almost a year.

Unfortunately, in lots of examples and tests, clock rate and/or channels
are not present (and in fact they are producing horrible SDPs that
contain `VP8/0` instead of `VP8/90000` and are incompatible with lots of
servers) therefore this new check causes troubles in existing code. In
order to maintain compatibility, default clock rates and channels are
provided for most codecs.

In the future, it might be better to update examples (i can do it in a
future patch) and remove the exception.
2025-02-15 21:16:47 -05:00
Sean DuBois
70d06fd9f6 Fix ivfwriter with VP9
Use the correct values for timestamps
2025-02-12 22:26:31 -05:00
renovate[bot]
ee669ca89d Update golang Docker tag to v1.24
Generated by renovateBot
2025-02-12 16:09:04 -05:00
Kevin Wang
bea7ae3745 Add ivfwriter support for VP9
Adds the necessary wiring to get VP9 to work with `ivfwriter`.
Update the README of save-to-disk to inform users it supports
both VP8 and VP9.
    
ivfwriter currently assumes 30 fps but it seems that the other codecs
also assume 30 fps so that is not a net-new assumption.
2025-02-12 16:06:41 -05:00
LeeTeng2001
306dc37769 Fix error handling in RTPReceiver.Receive
If we failed to startReceive we would still make the Receiver as ready
to start reading.
    
Fixes #2929
2025-02-12 11:47:42 -05:00
Sean DuBois
1c45355b8c Fix H264Writer writing 0 length payloads
Before we would call Write even if no bytes were available.
v4.0.9
2025-02-11 14:57:36 -05:00
Sean DuBois
46565ffd95 Cleanup PeerConnection in WriteRTCP Test
Relates to #3032
2025-02-11 14:21:32 -05:00
Sean DuBois
ae260d4eeb Assert that WriteRTCP works before connected
Resolves #3032
2025-02-11 14:10:45 -05:00
WofWca
99eb390362 Implement JSValue for more structures
Previously was only implemented for PeerConnection.
2025-02-11 12:41:11 -05:00
WofWca
4ee374714a Implement DataChannel OnError/OnClosing for WASM
`OnClosing` is only implemented in WASM at this time.

`OnError` isn't tested, but should work as follows the existing
code.

Relates to #479 
Relates to #519
2025-02-11 12:39:56 -05:00
renovate[bot]
59c72707b4 Update module golang.org/x/net to v0.34.0
Generated by renovateBot
2025-02-01 01:01:34 +00:00
Joe Turki
a0d7d022c0 Preserve ICE candidate Extensions
Ensure that ICE candidates are retained when parsed and stringified,
and converted to ICE.candidate.
2025-01-31 14:49:47 -06:00
renovate[bot]
7c3b12817a Update module github.com/pion/ice/v4 to v4.0.6 (#3025)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/pion/ice/v4](https://redirect.github.com/pion/ice) |
`v4.0.5` -> `v4.0.6` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpion%2fice%2fv4/v4.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpion%2fice%2fv4/v4.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpion%2fice%2fv4/v4.0.5/v4.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpion%2fice%2fv4/v4.0.5/v4.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pion/ice (github.com/pion/ice/v4)</summary>

### [`v4.0.6`](https://redirect.github.com/pion/ice/releases/tag/v4.0.6)

[Compare
Source](https://redirect.github.com/pion/ice/compare/v4.0.5...v4.0.6)

#### Changelog

-
[`d21ae5e`](d21ae5e0e5)
Include ufrag in generated ICE candidates
-
[`141df5a`](141df5a086)
Update module github.com/pion/logging to v0.2.3
-
[`9dfb5c2`](9dfb5c2667)
Allow for empty extension values
-
[`47dad55`](47dad556f1)
Add methods to add and remove extensions
-
[`cad1676`](cad1676659)
Upgrade golangci-lint, more linters

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pion/webrtc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-31 08:06:30 +00:00
renovate[bot]
47bde05666 Update module github.com/pion/logging to v0.2.3 (#3020)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/pion/logging](https://redirect.github.com/pion/logging) |
`v0.2.2` -> `v0.2.3` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpion%2flogging/v0.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpion%2flogging/v0.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpion%2flogging/v0.2.2/v0.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpion%2flogging/v0.2.2/v0.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pion/logging (github.com/pion/logging)</summary>

###
[`v0.2.3`](https://redirect.github.com/pion/logging/releases/tag/v0.2.3)

[Compare
Source](https://redirect.github.com/pion/logging/compare/v0.2.2...v0.2.3)

#### Changelog

-
[`770cd0b`](770cd0b2bb)
Fix flaky PION_LOG_\*, more tests
([#&#8203;117](https://redirect.github.com/pion/logging/issues/117))
-
[`8466bde`](8466bdebfc)
Upgrade golangci, Enable more linters
-
[`b6abcca`](b6abcca03b)
Update go.mod version to 1.20
-
[`9dc3c2e`](9dc3c2ead3)
Update CI configs to v0.11.15
-
[`5bb0d65`](5bb0d65625)
Update CI configs to v0.11.12
-
[`a6de6a9`](a6de6a9f77)
Update go.mod version to 1.19
-
[`1f0cca2`](1f0cca2e69)
Update CI configs to v0.11.7
-
[`986a4ff`](986a4ff4da)
Log to stderr by default, not stdout
-
[`6d08bc6`](6d08bc6c8e)
Update CI configs to v0.11.4
-
[`05c5f10`](05c5f10ef6)
Update CI configs to v0.11.3
-
[`29593ae`](29593aebe9)
Update CI configs to v0.11.0
-
[`4e7b423`](4e7b4238a8)
Remove 'AUTHORS.txt' from README.md
-
[`0492da5`](0492da50a8)
Remove 'Generate Authors' workflow
-
[`c3a15ed`](c3a15ed635)
Update CI configs to v0.10.11
-
[`b62977a`](b62977acd2)
Update CI configs to v0.10.9
-
[`37105f7`](37105f7335)
Bring back LICENSE file
-
[`c466bd8`](c466bd87af)
Update CI configs to v0.10.8
-
[`e60efc8`](e60efc8ffb)
Make package REUSE compliant
-
[`4ac3d41`](4ac3d4178e)
Update CI configs to v0.10.7
-
[`57c27e1`](57c27e160c)
Update CI configs to v0.10.6
-
[`7157224`](715722498f)
Harmonize sections in README
-
[`d4b7246`](d4b72463b6)
Update AUTHORS.txt
-
[`78fd1e6`](78fd1e69d2)
Cleanup common sections in README
-
[`463a608`](463a608813)
Cleanup badges in README
-
[`abff37d`](abff37dad8)
Update CI configs to v0.10.3
-
[`1a33d59`](1a33d599dd)
Update CI configs to v0.10.2
-
[`24ddd2d`](24ddd2da5b)
Update CI configs to v0.7.10
-
[`6158995`](6158995255)
Update CI configs to v0.7.9
-
[`9b909f6`](9b909f6383)
Update CI configs to v0.7.8
-
[`4217a1e`](4217a1e2c7)
Update CI configs to v0.7.5
-
[`efae134`](efae1345c1)
Update CI configs to v0.7.3
-
[`32cc142`](32cc142451)
Update CI configs to v0.7.2
-
[`eb043cd`](eb043cd1f6)
Update CI configs to v0.7.1
-
[`851eed6`](851eed6ca1)
Update CI configs to v0.7.0
-
[`1c9d1bc`](1c9d1bc6a9)
Update CI configs to v0.6.10
-
[`d1f23a7`](d1f23a75dd)
Update CI configs to v0.6.9
-
[`a78addf`](a78addf895)
Update CI configs to v0.6.8
-
[`21f382b`](21f382b0b8)
Update CI configs to v0.6.7
-
[`1255034`](1255034101)
Update CI configs to v0.6.6
-
[`7f68dfe`](7f68dfebb8)
Update CI configs to v0.6.4
-
[`cce6434`](cce6434b55)
Update CI configs to v0.6.2
-
[`41207f2`](41207f25a7)
Update CI configs to v0.6.0
-
[`b0e9686`](b0e9686919)
Update CI configs to v0.5.9
-
[`d572b72`](d572b72819)
Update CI configs to v0.5.6
-
[`911b565`](911b565091)
Update CI configs to v0.5.4
-
[`3aa5c12`](3aa5c12fda)
Update CI configs to v0.4.24
-
[`37cdd8d`](37cdd8d67a)
Update CI configs to v0.4.22
-
[`0b6cf40`](0b6cf40a44)
Update CI configs to v0.4.21
-
[`ed5ad6d`](ed5ad6d979)
Update CI configs to v0.4.20
-
[`f86d327`](f86d3277e5)
Update CI configs to v0.4.19
-
[`40a0233`](40a023361a)
Update CI configs to v0.4.18
-
[`1777ea7`](1777ea7174)
Update CI configs to v0.4.17
-
[`3ae4d55`](3ae4d55182)
Update CI configs to v0.4.15
-
[`aabfe56`](aabfe565ba)
Update CI configs to v0.4.14
-
[`c75a265`](c75a2659ab)
Update CI configs to v0.4.13
-
[`b734f6c`](b734f6ca5d)
Update CI configs to v0.4.12
-
[`8a6cf63`](8a6cf634f1)
Update CI configs to v0.4.10
-
[`051d147`](051d147ade)
Update CI configs to v0.4.9
-
[`3231fc7`](3231fc7f36)
Update CI configs to v0.4.8
-
[`d9c73ac`](d9c73ac36c)
Update CI configs to v0.4.7
-
[`5ac2036`](5ac2036d72)
Update CI configs to v0.4.6
-
[`d407078`](d4070784e6)
Update CI configs to v0.4.5
-
[`51ebba3`](51ebba3447)
Update CI configs to v0.3.4
-
[`6569cb4`](6569cb47fe)
Update CI configs to v0.3.3
-
[`ebe4248`](ebe4248d86)
Update CI configs to v0.3.1
-
[`cbaaf6c`](cbaaf6c310)
Update CI configs to v0.2.0
-
[`831b13e`](831b13ea93)
GoDoc -> pkg.go.dev
-
[`bae9dac`](bae9dacc9d)
Update CI configs to v0.1.3
-
[`99a34a6`](99a34a6f71)
Upgrade golangci-lint to 1.19.1
-
[`cedba27`](cedba27d5d)
Update assets to v0.0.2
-
[`4b131ff`](4b131ffec2)
Update golangci-lint

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pion/webrtc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 01:37:05 +00:00
Joe Turki
47c65c81e3 Remove outdated safety comment in RegisterCodec
The removed comment predates the introduction of locks in the
RegisterCodec method.
2025-01-22 10:31:10 -06:00
Joe Turki
feeeebf251 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 07:16:06 -06:00
Max Strömberg
99dcc6b7bf Add H265 payloader
Add H265 payloader support to mediaengine using Pion RTP v1.8.11.
v4.0.8
2025-01-16 11:58:29 -05:00
renovate[bot]
608d35f7bb Update module github.com/pion/ice/v4 to v4.0.5
Generated by renovateBot
2025-01-16 12:23:59 +00:00
Pablo Fuente Pérez
fe41afd3f2 Fix deadlock in DataChannel with mutex unlock
Fulfill request changes in PR 3009

Close answer and assert errors in detach tests
2025-01-16 13:11:57 +01:00
renovate[bot]
49b555bbc1 Update module github.com/pion/ice/v4 to v4.0.4 (#3004)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/pion/ice/v4](https://redirect.github.com/pion/ice) |
`v4.0.3` -> `v4.0.4` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpion%2fice%2fv4/v4.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpion%2fice%2fv4/v4.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpion%2fice%2fv4/v4.0.3/v4.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpion%2fice%2fv4/v4.0.3/v4.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pion/ice (github.com/pion/ice/v4)</summary>

### [`v4.0.4`](https://redirect.github.com/pion/ice/releases/tag/v4.0.4)

[Compare
Source](https://redirect.github.com/pion/ice/compare/v4.0.3...v4.0.4)

#### What's Changed

- docs(agent_config.go): update KeepaliveInterval default value to 2 sec
by [@&#8203;amincheloh](https://redirect.github.com/amincheloh) in
[https://github.com/pion/ice/pull/730](https://redirect.github.com/pion/ice/pull/730)
- Add nil checks to agent_handlers by
[@&#8203;dkess](https://redirect.github.com/dkess) in
[https://github.com/pion/ice/pull/751](https://redirect.github.com/pion/ice/pull/751)
- Use addrEqual for candidate comparison by
[@&#8203;paulwe](https://redirect.github.com/paulwe) in
[https://github.com/pion/ice/pull/752](https://redirect.github.com/pion/ice/pull/752)

#### New Contributors

- [@&#8203;amincheloh](https://redirect.github.com/amincheloh) made
their first contribution in
[https://github.com/pion/ice/pull/730](https://redirect.github.com/pion/ice/pull/730)

**Full Changelog**: https://github.com/pion/ice/compare/v4.0.3...v4.0.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pion/webrtc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 08:17:48 +00:00
Juliusz Chroboczek
f2191fbfa7 Finish moving SDESRTPStreamIDURI (#3000)
Finish moving SDESRTPStreamIDURI from here to pion/sdp.
2025-01-13 09:25:13 -05:00
Xavier Drudis
cdacd1c3b0 Rewrite VP8 isKeyFrame check (#2999)
#### Description
[RFC 6386](https://www.rfc-editor.org/rfc/rfc6386#section-9.1) describes
the least significant bit of the first byte of the header as:
```
A 1-bit frame type (0 for key frames, 1 for interframes).
```

The change is functionally a no-op, but the naming implies the wrong
logic (you would assume `isKeyFrame == 1` means it is a key frame, but
the opposite is true).

#### Reference issue
Fixes #...
2025-01-11 21:32:28 -08:00
Joe Turk
5edce958fd Include sdpMid and sdpMLineIndex for ICECandidates returned by OneICECandidate (#2990)
#### Description
Currently, Pion returns an empty `sdpMid` and a 0 `sdpMLineIndex`. This
PR ensures Pion returns the corresponding `sdpMid` and `sdpMLineIndex`
for ICE candidates for clients that expects it. Fixes trickle issues.

#### Changes

1. `ICECandidates`: New fields `SDPMid` and `SDPMLineIndex`.
2. `ICEGatherer`: `SetMediaStreamIdentification` and return the correct
`SDPMid` and `SDPMLineIndex`.
3. `extractICEDetails`: Return a struct instead of multiple values.
4. `extractICEDetails` refactored the media description selection to a
different function.
5. Added new tests.

#### Reference issue
Fixes https://github.com/pion/webrtc/issues/2690
Fixes https://github.com/pion/webrtc/issues/1833
2025-01-08 19:08:44 -06:00
Juliusz Chroboczek
c50ca41e56 Improve documentation of ConfigureTWCCSender
Mention that it must be called after registering codecs.
2025-01-08 10:00:37 -05:00
Juliusz Chroboczek
6f6231b062 Minor fixes to TestInterceptorNack
One variable was misnamed, and we never checked for the end
of the RTCP loop.
2025-01-08 10:00:12 -05:00
5ur3
b47fbb6b5e Implement more webrtc-stats
InboundRTPStreamStats:

* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-pausecount
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalpausesduration
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalfreezesduration
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-powerefficientdecoder

OutboundRTPStreamStats:
* https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-powerefficientencoder
* https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-scalabilitymode
2025-01-08 09:59:30 -05:00
Joe Turk
c895252d72 Gracefully close connecting channels (#2991)
Fixes an issue where calling dataChannel.Close on
'connecting' state channels didn't work as expected.
When handling the `OnOpen` event detect if the
user has requested close.

Fixes #2659
2025-01-08 09:57:55 -05:00
Xavier Drudis
1ee02999eb Defense against timebase with denominator 0 2025-01-02 15:33:18 -05:00
Xavier Drudis
40358b3d1e Defense against timebase with denominator 0 2025-01-02 15:33:18 -05:00
Xavier Drudis
d5e07a1bcf Restore relative timestamp 2025-01-02 15:33:18 -05:00
Xavier Drudis
04b46212a9 Nits 2025-01-02 15:33:18 -05:00
Xavier Drudis
31d8dbc720 Fix IVF timestamps 2025-01-02 15:33:18 -05:00
Xavier Drudis
8b3734e5d3 Revert "Adapt an existing test to provide coverage"
This reverts commit dbe26d34d8.
2025-01-02 15:33:18 -05:00
Xavier Drudis
0ae39fd72a Revert "IVF writer fix invalid timestamp into headers"
This reverts commit 4f40756d9c.
2025-01-02 15:33:18 -05:00
Juliusz Chroboczek
92fce5ff17 Add an end-to-end test for the NACK sender
Test that NACKs are negotiated correctly, and that we receive
the expected NACK if we negotiated it.
2025-01-02 15:37:53 +01:00
Xavier Drudis
92d573c35b Fix broken links in save-to-disk examples 2025-01-01 23:32:10 -05:00