BIG rewrite stream info
This commit is contained in:
@@ -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}
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/AlexxIT/go2rtc/pkg/tcp"
|
||||
)
|
||||
|
||||
// Deprecated: should be rewritten to core.Connection
|
||||
type Client struct {
|
||||
core.Listener
|
||||
|
||||
|
||||
Reference in New Issue
Block a user