Skip to content
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

Pass pullAlgorithm while initializing [[readable]]? #187

Open
saschanaz opened this issue Jun 22, 2023 · 2 comments · May be fixed by #194
Open

Pass pullAlgorithm while initializing [[readable]]? #187

saschanaz opened this issue Jun 22, 2023 · 2 comments · May be fixed by #194

Comments

@saschanaz
Copy link
Member

https://w3c.github.io/webrtc-encoded-transform/#stream-creation

Set up this.[[readable]]. this.[[readable]] is provided frames using the readEncodedData algorithm given this as parameter.

But it defines no pullAlgorithm, and nothing explicitly calls readEncodedData outside the stream, which means nothing will enqueue any data at all. Should it pass a pullAlgorithm that calls readEncodedData?

@youennf
Copy link
Collaborator

youennf commented Jun 23, 2023

Right, there is a mismatch here.

The intent was to use the start algorithm that would basically wait for a frame to be available and enqueue it as soon as available, independently on the actual queue size or whether pull was called (no backpressure like on writer side).

We should revise this section to align and could use readEncodedData as part of pulling data.

Maybe we could revise the back pressure mechanism here, depending on what UAs actually do (Safari has no back pressure here).

@saschanaz
Copy link
Member Author

The intent was to use the start algorithm that would basically wait for a frame to be available and enqueue it as soon as available, independently on the actual queue size or whether pull was called (no backpressure like on writer side).

Sounds also like it could be helped by setting highWaterMark to infinity, as doing so will start pulling immediately and indefinitely.

youennf added a commit to youennf/webrtc-insertable-streams that referenced this issue Jul 5, 2023
…a promise.

Set the highWaterMark to Infinity to keep the same behavior (no backpressure) and add a note about this.

Fixes w3c#187.
youennf added a commit to youennf/webrtc-insertable-streams that referenced this issue Jul 5, 2023
…a promise.

Set the highWaterMark to Infinity to keep the same behavior (no backpressure) and add a note about this.

Fixes w3c#187.
youennf added a commit to youennf/webrtc-insertable-streams that referenced this issue Jul 5, 2023
…a promise.

Set the highWaterMark to Infinity to keep the same behavior (no backpressure) and add a note about this.

Fixes w3c#187.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants