support publishing with WebRTC (#1659) (#1786)

This commit is contained in:
Alessandro Ros
2023-05-14 14:18:03 +02:00
committed by GitHub
parent 6ea299fc56
commit 1688e5d2e5
39 changed files with 1928 additions and 951 deletions

View File

@@ -148,9 +148,7 @@ func (s *rtmpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf cha
s.Log(logger.Info, "ready: %s", sourceMediaInfo(medias))
defer func() {
s.parent.sourceStaticImplSetNotReady(pathSourceStaticSetNotReadyReq{})
}()
defer s.parent.sourceStaticImplSetNotReady(pathSourceStaticSetNotReadyReq{})
videoWriteFunc := getRTMPWriteFunc(videoMedia, videoFormat, res.stream)
audioWriteFunc := getRTMPWriteFunc(audioMedia, audioFormat, res.stream)
@@ -207,8 +205,9 @@ func (s *rtmpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf cha
}
// apiSourceDescribe implements sourceStaticImpl.
func (*rtmpSource) apiSourceDescribe() interface{} {
return struct {
Type string `json:"type"`
}{"rtmpSource"}
func (*rtmpSource) apiSourceDescribe() pathAPISourceOrReader {
return pathAPISourceOrReader{
Type: "rtmpSource",
ID: "",
}
}