-
Notifications
You must be signed in to change notification settings - Fork 32
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
Initial, partial WHIP support #97
Conversation
biglittlebigben
commented
Apr 28, 2023
- Supports WHIP ingress, transcoding the media
- Tested with OBS experimental, non merged WHIP support
- Doesn't support TRICKLE ICE or ICE restarts yet
- Integration tests still require work
- This adds an "extra params" command line parameter to the handler process to pass in protocol specific initialization parameters (SDP offer and resource ID here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work!!
|
||
closeOnce := sync.Once{} | ||
pc.OnConnectionStateChange(func(state webrtc.PeerConnectionState) { | ||
logger.Infow("Peer Connection State changed", "state", state.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would be better to use whipsrc logger with the right fields for the current ingress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code path is called in the handle process, where we replaces early in the execution the default logger with one that had the ingressID and resourceID fields. Is there any reason to have a specific logger object in the whipsrc?
|
||
for _, codec := range []webrtc.RTPCodecParameters{ | ||
{ | ||
RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypePCMA, ClockRate: 8000}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize WHIP supported PCM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says nothing about codec support (which is one more reason that makes not transcoding painful operationally). I do not know if any whip client currently supports PCM. Dean had PCM in his prototype, so I put there too. We can remove it if we want to be more conservative about codec support initially.
_, err = s.rpcClient.DeleteWHIPResource(context.Background(), resourceID, req, psrpc.WithRequestTimeout(5*time.Second)) | ||
}).Methods("DELETE") | ||
|
||
// Trickle, ICE Restart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does WHIP support trickle ICE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does in the client -> server path. See section 4.1 of the RFC (https://www.ietf.org/archive/id/draft-ietf-wish-whip-08.txt). I do not know if any client currently support it.
This is the v1.0.0 release of the ingress service. This release stabilizes the API and adds support for the WHIP protocol ## Changelog ### Added - WHIP support (#97) - Expose heath and availability on the WHIP HTTP server (#109) - Add support for optimally bypassing transcoding when ingesting WHIP (#111) - Set the source track information in the ingress state (#121) ### Fixed - Validate IngressInfo and populate missing fields with defaults (#90) - Fix deadlock in appsrc (#116) - Update synchronizer and use Jitter Buffer (#118)