Browse Source

api: fix type of RTMPS readers (#1784)

it was wrongly set to RTMP.
pull/1789/head
Alessandro Ros 2 years ago committed by GitHub
parent
commit
6ea299fc56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      internal/core/rtmp_conn.go
  2. 12
      internal/core/rtsp_session.go

5
internal/core/rtmp_conn.go

@ -820,10 +820,7 @@ func (c *rtmpConn) runPublish(ctx context.Context, u *url.URL) error {
// apiReaderDescribe implements reader. // apiReaderDescribe implements reader.
func (c *rtmpConn) apiReaderDescribe() interface{} { func (c *rtmpConn) apiReaderDescribe() interface{} {
return struct { return c.apiSourceDescribe()
Type string `json:"type"`
ID string `json:"id"`
}{"rtmpConn", c.uuid.String()}
} }
// apiSourceDescribe implements source. // apiSourceDescribe implements source.

12
internal/core/rtsp_session.go

@ -432,17 +432,7 @@ func (s *rtspSession) onPause(ctx *gortsplib.ServerHandlerOnPauseCtx) (*base.Res
// apiReaderDescribe implements reader. // apiReaderDescribe implements reader.
func (s *rtspSession) apiReaderDescribe() interface{} { func (s *rtspSession) apiReaderDescribe() interface{} {
var typ string return s.apiSourceDescribe()
if s.isTLS {
typ = "rtspsSession"
} else {
typ = "rtspSession"
}
return struct {
Type string `json:"type"`
ID string `json:"id"`
}{typ, s.uuid.String()}
} }
// apiSourceDescribe implements source. // apiSourceDescribe implements source.

Loading…
Cancel
Save