Add RTSP SDP to stream info JSON

This commit is contained in:
Alexey Khit
2023-07-23 17:26:26 +03:00
parent 3defbd60db
commit e6a87fbd69
5 changed files with 20 additions and 7 deletions
+2
View File
@@ -3,6 +3,7 @@ package rtsp
import (
"encoding/json"
"errors"
"github.com/AlexxIT/go2rtc/pkg/core"
)
@@ -100,6 +101,7 @@ func (c *Conn) Stop() (err error) {
func (c *Conn) MarshalJSON() ([]byte, error) {
info := &core.Info{
Type: "RTSP " + c.mode.String(),
SDP: c.sdp,
UserAgent: c.UserAgent,
Medias: c.Medias,
Receivers: c.receivers,