[webrtc-rtptransport] Pull Request: Bring Your Own Packets

henbos has just submitted a new pull request for https://github.com/w3c/webrtc-rtptransport:

== Bring Your Own Packets ==
Fixes #77.

Allows constructing and modifying RTCRtpPacket such that packets can be read or written without having to construct temporary objects for every packet that goes through the pipeline which could be [several thousands](https://github.com/w3c/webrtc-rtptransport/issues/77#issuecomment-2422648856).

Because you can both read and write to packets (in order to recycle them) it made more sense to make everything into a read+write attribute rather than readonly attributes with getters.

To be discussed:
- Does this make sense?
- How does packet.payload buffer work? E.g. what if my buffer is of size 100 but the packet I am reading only contains 50 bytes or vice versa

See https://github.com/w3c/webrtc-rtptransport/pull/84


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 13 January 2025 15:28:09 UTC