Skip to content

Adds a backpressure signal to the streaming protocol. - #248

Merged
markafoltz merged 3 commits into
masterfrom
issue-241-backpressure-signal
Mar 16, 2021
Merged

markafoltz merged 3 commits into
masterfrom
issue-241-backpressure-signal

Conversation

@markafoltz

@markafoltz markafoltz commented Oct 19, 2020 •

Copy link
Copy Markdown
Contributor

Addresses Issue #241: Add a back pressure signal for media remoting.

This adds a backpressure signal to the streaming-session-receiver-stats-event message, so the receiver can report the status of its frame buffer (if it is using one). The states are borrowed from my interpretation of w3c/remote-playback#126.

An item to discuss is how and whether to expose this to script along the lines of w3c/remote-playback#126.


Preview | Diff

@markafoltz

Copy link
Copy Markdown
Contributor Author

@takumif @mounirlamouri @eric-carlson @chrisn

Notifying folks who were involved in earlier discussions around this for any feedback on the PR.

The idea is to allow the receiver of a media stream (i.e., from media remoting) to signal the sender of the media stream whether it should adjust its data rate up or down to prevent buffer overruns or underruns. Here's the timeline of previous discussions:

@louaybassbouss

Copy link
Copy Markdown
Contributor

Thanks @mfoltzgoogle for the PR happy to review it but I need to understand one thing: the main use case as I can see from the related issues is MSE. Are the frames decoded on the sender before they are transmitted to the receiver or the sender just transmits the media segments to the receiver without re-encoding?

@louaybassbouss

Copy link
Copy Markdown
Contributor

@mfoltzgoogle the backpressure solution you provided LGTM. It added @chrisn and @mounirlamouri as reviewers and I hope we can merge it soon. @takumif @eric-carlson feel free to review as well (I couldn't add you as reviewer)

@markafoltz

Copy link
Copy Markdown
Contributor Author

Thanks @mfoltzgoogle for the PR happy to review it but I need to understand one thing: the main use case as I can see from the related issues is MSE. Are the frames decoded on the sender before they are transmitted to the receiver or the sender just transmits the media segments to the receiver without re-encoding?

That's correct, the main use case is when the sender has pre-encoded media that is being fetched from a server or file, and wants to play it back on a remote device (agent receiving the stream in the protocol). For Web apps using the Remote Playback API, the media would be provided from the Web app to the protocol through MSE.

The sender can use the backpressure signal from the receiver to make adjustments to the send rate and how much it's buffering on the sender side. Some senders may be able to transcode the media to change the effective data rate.

It might be helpful to generate simulations showing when the signal might be sent and how it can be used to ensure uninterrupted playback on the receiver device when remoting from MSE.

@chrisn chrisn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from one minor typo, this looks good to me. I agreed with @mfoltzgoogle's comment in the meeting that feedback from prototyping could be helpful.

Comment thread index.bs Resolved
@louaybassbouss

Copy link
Copy Markdown
Contributor

Thanks @mfoltzgoogle for the explanation and @chrisn for review. Lets wait 1-2 days for more feedback and merge this PR.

@anssiko

anssiko commented Mar 16, 2021

Copy link
Copy Markdown
Member

LGTM.

We did not explicitly note #241 as a FPWD blocker in #249 (comment) but seems like we want to squeeze this in the FPWD so I’d suggest snapshotting that release when this PR is merged.

@tidoust, can you check we can make 18 March FPWD with this integrated i.e. builds w/o errors and passes all the publication checks? Thanks!

@anssiko anssiko mentioned this pull request Mar 16, 2021
2 tasks done
@markafoltz
markafoltz merged commit 2c071ca into master Mar 16, 2021
github-actions Bot added a commit that referenced this pull request Mar 16, 2021
…re-signalAdds a backpressure signal to the streaming protocol.

SHA: 2c071ca
Reason: push, by @mfoltzgoogle

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@markafoltz

Copy link
Copy Markdown
Contributor Author

It sounds like we want to ensure this is in the FPWD, so I went ahead and merged the current snapshot of the PR. I will leave the issue open in case there is additional feedback from reviewers.

@markafoltz
markafoltz deleted the issue-241-backpressure-signal branch March 16, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants