BIG rewrite stream info

This commit is contained in:
Alex X
2024-06-15 16:46:03 +03:00
parent ecfe802065
commit 96504e2fb0
88 changed files with 1043 additions and 854 deletions
@@ -2,6 +2,7 @@ package isapi
import (
"encoding/json"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/rtp"
)
@@ -51,10 +52,15 @@ func (c *Client) Stop() (err error) {
}
func (c *Client) MarshalJSON() ([]byte, error) {
info := &core.Info{
Type: "ISAPI active consumer",
Medias: c.medias,
Send: c.send,
info := &core.Connection{
ID: core.ID(c),
FormatName: "isapi",
Protocol: "http",
Medias: c.medias,
Send: c.send,
}
if c.conn != nil {
info.RemoteAddr = c.conn.RemoteAddr().String()
}
if c.sender != nil {
info.Senders = []*core.Sender{c.sender}
+1
View File
@@ -11,6 +11,7 @@ import (
"github.com/AlexxIT/go2rtc/pkg/tcp"
)
// Deprecated: should be rewritten to core.Connection
type Client struct {
core.Listener