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

Initial, partial WHIP support #97

Merged
merged 28 commits into from
May 1, 2023
Merged

Initial, partial WHIP support #97

merged 28 commits into from
May 1, 2023

Conversation

biglittlebigben
Copy link
Contributor

  • 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)

Copy link
Member

@davidzhao davidzhao left a 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())
Copy link
Member

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.

Copy link
Contributor Author

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},
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

@biglittlebigben biglittlebigben May 1, 2023

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.

@biglittlebigben biglittlebigben merged commit f46fb18 into main May 1, 2023
@biglittlebigben biglittlebigben deleted the benjamin/whip branch May 1, 2023 20:55
biglittlebigben added a commit that referenced this pull request Jun 26, 2023
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)
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