From 6ea299fc565a8524c41f1f097aef5f2ac842566f Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Wed, 10 May 2023 11:39:40 +0200 Subject: [PATCH] api: fix type of RTMPS readers (#1784) it was wrongly set to RTMP. --- internal/core/rtmp_conn.go | 5 +---- internal/core/rtsp_session.go | 12 +----------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/internal/core/rtmp_conn.go b/internal/core/rtmp_conn.go index 85c1eb71..c0197c05 100644 --- a/internal/core/rtmp_conn.go +++ b/internal/core/rtmp_conn.go @@ -820,10 +820,7 @@ func (c *rtmpConn) runPublish(ctx context.Context, u *url.URL) error { // apiReaderDescribe implements reader. func (c *rtmpConn) apiReaderDescribe() interface{} { - return struct { - Type string `json:"type"` - ID string `json:"id"` - }{"rtmpConn", c.uuid.String()} + return c.apiSourceDescribe() } // apiSourceDescribe implements source. diff --git a/internal/core/rtsp_session.go b/internal/core/rtsp_session.go index 7a89a85e..20344f37 100644 --- a/internal/core/rtsp_session.go +++ b/internal/core/rtsp_session.go @@ -432,17 +432,7 @@ func (s *rtspSession) onPause(ctx *gortsplib.ServerHandlerOnPauseCtx) (*base.Res // apiReaderDescribe implements reader. func (s *rtspSession) apiReaderDescribe() interface{} { - var typ string - if s.isTLS { - typ = "rtspsSession" - } else { - typ = "rtspSession" - } - - return struct { - Type string `json:"type"` - ID string `json:"id"` - }{typ, s.uuid.String()} + return s.apiSourceDescribe() } // apiSourceDescribe implements source.