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

Add a media handler to respond to intra frame requests #999

Merged
merged 4 commits into from
Oct 27, 2023

Conversation

kuzux
Copy link
Contributor

@kuzux kuzux commented Oct 5, 2023

This PR introduces a PLIResponder class, which can be used for responding back with an intra frame after the receiver requests one with an FIR (Full Intra Request) or a PLI (Picture Loss Indicator) message.

This is useful when a video is being streamed live and we can control the behavior of the video encoder. PLIResponder simply notifies its caller when a new intra frame is requested, which passes this request onto its video frame source.

I actually thought about contributing the generic PLIResponder thing we used upstream all the way back last year, but the implementation back then had some issues (later discovered that they were due to browsers grouping control messages)

Now, there are a couple things missing:

  • The naming is temporary, since this responds to FIR messages as well as PLI
  • I'm not sure about how to integrate this into the C API
  • Also I'm not sure about how to integrate this into an example (This doesn't make sense in the existing examples since none of them can meaningfully respond to an intra frame request)

@kuzux
Copy link
Contributor Author

kuzux commented Oct 5, 2023

Also noticed that #929 will definitely change things in relation to this :D

This introduces a PLIResponder class, which can be used for responding
back with an intra frame after the receiver requests one with an FIR
(Full Intra Request) or a PLI (Picture Loss Indicator) message.

This is useful when a video is being streamed live and we can control
the behavior of the video encoder. PLIResponder simply notifies its
caller when a new intra frame is requested, which passes this request
onto its video frame source.
include/rtc/pliresponder.hpp Outdated Show resolved Hide resolved
include/rtc/pliresponder.hpp Outdated Show resolved Hide resolved
Though I'm still not quite sure about the name since it's not exactly pli specific
@paullouisageneau paullouisageneau marked this pull request as ready for review October 26, 2023 11:26
Copy link
Owner

@paullouisageneau paullouisageneau left a comment

Choose a reason for hiding this comment

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

Looking good, thanks. I'll handle the refactoring in #929.

@paullouisageneau paullouisageneau merged commit d2d17b2 into paullouisageneau:master Oct 27, 2023
11 checks passed
@chobie chobie mentioned this pull request Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants