diff --git a/internal/core/hls_remuxer.go b/internal/core/hls_remuxer.go index b447efde..372566f4 100644 --- a/internal/core/hls_remuxer.go +++ b/internal/core/hls_remuxer.go @@ -107,7 +107,7 @@ type hlsRemuxer struct { ctx context.Context ctxCancel func() - path readPublisherPath + path *path ringBuffer *ringbuffer.RingBuffer lastRequestTime *int64 muxer *hls.Muxer diff --git a/internal/core/read_publisher.go b/internal/core/read_publisher.go index aea5787d..89bbbad5 100644 --- a/internal/core/read_publisher.go +++ b/internal/core/read_publisher.go @@ -7,20 +7,8 @@ import ( "github.com/aler9/gortsplib" "github.com/aler9/gortsplib/pkg/base" "github.com/aler9/gortsplib/pkg/headers" - - "github.com/aler9/rtsp-simple-server/internal/conf" ) -type readPublisherPath interface { - Name() string - Conf() *conf.PathConf - OnReadPublisherRemove(readPublisherRemoveReq) - OnReadPublisherPlay(readPublisherPlayReq) - OnReadPublisherRecord(readPublisherRecordReq) readPublisherRecordRes - OnReadPublisherPause(readPublisherPauseReq) - OnSourceFrame(int, gortsplib.StreamType, []byte) -} - type readPublisherErrNoOnePublishing struct { PathName string } @@ -73,7 +61,7 @@ type readPublisherDescribeReq struct { } type readPublisherSetupPlayRes struct { - Path readPublisherPath + Path *path Stream *gortsplib.ServerStream Err error } @@ -87,7 +75,7 @@ type readPublisherSetupPlayReq struct { } type readPublisherAnnounceRes struct { - Path readPublisherPath + Path *path Err error } diff --git a/internal/core/rtmp_conn.go b/internal/core/rtmp_conn.go index ccef7eef..3f6f448e 100644 --- a/internal/core/rtmp_conn.go +++ b/internal/core/rtmp_conn.go @@ -68,7 +68,7 @@ type rtmpConn struct { ctx context.Context ctxCancel func() - path readPublisherPath + path *path ringBuffer *ringbuffer.RingBuffer // read } diff --git a/internal/core/rtsp_session.go b/internal/core/rtsp_session.go index b70e2ef0..b2a396b9 100644 --- a/internal/core/rtsp_session.go +++ b/internal/core/rtsp_session.go @@ -31,7 +31,7 @@ type rtspSession struct { pathManager *pathManager parent rtspSessionParent - path readPublisherPath + path *path setuppedTracks map[int]*gortsplib.Track // read onReadCmd *externalcmd.Cmd // read }