-
Notifications
You must be signed in to change notification settings - Fork 28
Add SFrame packetization handling for SFrameTransform #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,13 +48,21 @@ spec:webidl; type:dfn; text:resolve | |
| "href": "https://datatracker.ietf.org/doc/draft-ietf-avtcore-abs-capture-time/", | ||
| "title": "RTP Header Extension for Absolute Capture Time", | ||
| "publisher": "IETF" | ||
| }, | ||
| "RTP-SFRAME-PAYLOAD": { | ||
| "href": "https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-sframe/", | ||
| "title": "RTP Payload Format for SFrame", | ||
| "publisher": "IETF" | ||
| } | ||
| } | ||
| </pre> | ||
| <pre class=link-defaults> | ||
| spec:streams; type:interface; text:ReadableStream | ||
| spec:infra; type:dfn; text:list | ||
| </pre> | ||
| <pre class=anchors> | ||
| url: https://w3c.github.io/webrtc-pc/#dfn-check-if-negotiation-is-needed; text: check the negotiation-needed flag; type: dfn; spec: WEBRTC | ||
| </pre> | ||
|
|
||
| # Introduction # {#introduction} | ||
|
|
||
|
|
@@ -119,6 +127,17 @@ the original frame. | |
|
|
||
| ## Extension operation ## {#operation} | ||
|
|
||
| At construction of each {{RTCRtpTransceiver}}, run the following steps: | ||
| 1. If [=this=] is associated with a media description, initialize [=this=].`[[useSFrame]]` from the media description. If [=this=].`[[useSFrame]]` is true, enable SFrame RTP packetization for [=this=]. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How this would apply for the frame/packet encryption? For frame level encryption suggested algorithm looks good. Could you explain how this would change in the future for packet level sframe? |
||
| 1. Otherwise, [=queue a task=] to run the following steps: | ||
| 1. If [=this=].`[[useSFrame]]` is undefined, set [=this=].`[[useSFrame]]` to false. | ||
|
|
||
| <p class=note> | ||
| {{RTCRtpTransceiver}}.`[[useSFrame]]` should be set either synchronously, in case it is already tied to a SDP m-section, or asynchronously, before it is associated to a SDP m-section. | ||
| This ensures that {{RTCRtpTransceiver}}.`[[useSFrame]]` and the corresponding SDP are always synchronized. | ||
| By doing so, the handling related to the negotiation-needed flag, like the [=check the negotiation-needed flag=] algorithm, does not need to take into account {{RTCRtpTransceiver}}.`[[useSFrame]]`. | ||
| </p> | ||
|
|
||
| At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps: | ||
| 1. Initialize [=this=].`[[transform]]` to null. | ||
| 1. Initialize [=this=].`[[pipeToController]]` to null. | ||
|
|
@@ -188,6 +207,15 @@ and a <dfn abstract-op for=RTCRtpTransform>disassociation algorithm</dfn>, both | |
| The <dfn attribute for="RTCRtpSender,RTCRtpReceiver">transform</dfn> getter steps are to | ||
| return [=this=].`[[transform]]`. The setter steps are: | ||
| 1. Let |transform| be the argument to the setter. | ||
| 1. Let |transceiver| be the {{RTCRtpTransceiver}} associated to [=this=]. | ||
| 1. If |transform|.`[[useSFrame]]` is true, run the following steps: | ||
| 1. If |transceiver|.`[[useSFrame]]` is false, throw a {{InvalidModificationError}} and abort these steps. | ||
| 1. Otherwise, if |transceiver|.`[[useSFrame]]` is undefined, run the following steps: | ||
| 1. Set |transceiver|.`[[useSFrame]]` to true. | ||
| 1. Enable SFrame RTP packetization for |transceiver|. | ||
| 1. Otherwise, run the following steps: | ||
| 1. If |transceiver|.`[[useSFrame]]` is true, throw a {{InvalidModificationError}} and abort these steps. | ||
| 1. Set |transceiver|.`[[useSFrame]]` to false. | ||
|
Comment on lines
+217
to
+219
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @youennf I don't remember what was the outcome of the W3C meeting in which disabling sframe was discussed. It was supposed to be possible to disable a sframe on the transceiver? Or rather if transceiver have once initiated sframe, it must remain in this state? If the outcome was that we should be able to disable sframe for transceiver, the steps here shouldn't mention that both sender/receiver transforms should be set to Also what would be the way for the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was discussed during https://www.w3.org/2025/10/21-webrtc-minutes#981d |
||
| 1. If |transform| is not null and |transform|.`[[owner]]` is not null, throw a {{InvalidStateError}} and abort these steps. | ||
| 1. Set |transform|.`[[owner]]` to [=this=]. | ||
| 1. Let |oldTransform| be [=this=].`[[transform]]`. | ||
|
|
@@ -289,11 +317,13 @@ The <dfn constructor for="RTCSFrameSenderTransform" lt="RTCSFrameSenderTransform | |
| 1. Let |options| be the method's first argument. | ||
| 1. Run the [=SFrame initialization algorithm=] with |this| and |options|. | ||
| 1. Set |this|.`[[role]]` to 'encrypt'. | ||
| 1. Set |this|.`[[useSFrame]]` to true. | ||
|
|
||
| The <dfn constructor for="RTCSFrameReceiverTransform" lt="RTCSFrameReceiverTransform(options)"><code>new RTCSFrameReceiverTransform(<var>options</var>)</code></dfn> constructor steps are: | ||
| 1. Let |options| be the method's first argument. | ||
| 1. Run the [=SFrame initialization algorithm=] with |this| and |options|. | ||
| 1. Set |this|.`[[role]]` to 'decrypt'. | ||
| 1. Set |this|.`[[useSFrame]]` to true. | ||
|
|
||
| The <dfn constructor for="SFrameEncrypterStream" lt="SFrameEncrypterStream(options)"><code>new SFrameEncrypterStream(<var>options</var>)</code></dfn> constructor steps are: | ||
| 1. Let |options| be the method's first argument. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.