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
+1
View File
@@ -26,6 +26,7 @@ const (
StateHandle
)
// Deprecated: should be rewritten to core.Connection
type Client struct {
core.Listener
+11 -5
View File
@@ -2,6 +2,7 @@ package ivideon
import (
"encoding/json"
"github.com/AlexxIT/go2rtc/pkg/core"
)
@@ -32,11 +33,16 @@ func (c *Client) Stop() error {
}
func (c *Client) MarshalJSON() ([]byte, error) {
info := &core.Info{
Type: "Ivideon active producer",
URL: c.ID,
Medias: c.medias,
Recv: c.recv,
info := &core.Connection{
ID: core.ID(c),
FormatName: "ivideon",
Protocol: "ws",
URL: c.ID,
Medias: c.medias,
Recv: c.recv,
}
if c.conn != nil {
info.RemoteAddr = c.conn.RemoteAddr().String()
}
if c.receiver != nil {
info.Receivers = []*core.Receiver{c.receiver}