You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the followin
90
90
5. Set [=this=].`[[readable]]`.`[[owner]]` to |this|.
91
91
6. Initialize [=this=].`[[writable]]` to a new {{WritableStream}}.
92
92
7. <a dfn for="WritableStream">Set up</a>[=this=].`[[writable]]` with its [=WritableStream/set up/writeAlgorithm=] set to [$writeEncodedData$] given |this| as parameter and its [=WritableStream/set up/highWaterMark=] set to <code>Infinity</code>.
93
-
<p class="note">highWaterMark is set to Infinity to explicitly disable backpressure. The goal is to limit buffering as much as possible.</p>
93
+
<p class="note">highWaterMark is set to Infinity to explicitly disable backpressure.</p>
94
94
8. Set [=this=].`[[writable]]`.`[[owner]]` to |this|.
95
95
9. Initialize [=this=].`[[pipeToController]]` to null.
96
96
1. Initialize [=this=].`[[lastReceivedFrameCounter]]` to <code>0</code>.
@@ -101,6 +101,15 @@ At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the followin
101
101
<!-- FIXME: Use pipeTo algorithm when available. -->
102
102
3. Call <a href="https://streams.spec.whatwg.org/#readable-stream-pipe-to">pipeTo</a> with [=this=].`[[readable]]`, [=this=].`[[writable]]`, preventClose equal to true, preventAbort equal to true, preventCancel equal to true and [=this=].`[[pipeToController]]`.signal.
103
103
104
+
<p class=note>
105
+
Streams backpressure can optimize throughput while limiting processing and memory consumption by pausing data production as early as possible in a data pipeline.
106
+
This proves useful in contexts where reliability is essential and latency is less of a concern.
107
+
On the other hand, WebRTC media pipelines favour latency over reliability, for instance by allowing to drop frames at various places and by using recovery mechanisms.
108
+
Buffering within WebRTC encoded transform would add latency without allowing web applications to adapt much.
109
+
The User Agent is responsible to do these adaptations, especially since it controls both ends of the transform.
110
+
For those reasons, streams backpressure is disabled in WebRTC encoded transforms.
111
+
</p>
112
+
104
113
### Stream processing ### {#stream-processing}
105
114
106
115
The <dfn abstract-op>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It is defined by running the following steps:
0 commit comments