2020-10-02 10:12:47 +03:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// Broadcaster represents the details around the inbound broadcasting connection.
|
|
|
|
type Broadcaster struct {
|
2023-05-30 20:31:43 +03:00
|
|
|
Time time.Time `json:"time"`
|
2020-10-02 10:12:47 +03:00
|
|
|
RemoteAddr string `json:"remoteAddr"`
|
|
|
|
StreamDetails InboundStreamDetails `json:"streamDetails"`
|
|
|
|
}
|
|
|
|
|
2021-02-19 10:05:52 +03:00
|
|
|
// InboundStreamDetails represents an inbound broadcast stream.
|
2020-10-02 10:12:47 +03:00
|
|
|
type InboundStreamDetails struct {
|
2023-05-30 20:31:43 +03:00
|
|
|
VideoCodec string `json:"videoCodec"`
|
|
|
|
AudioCodec string `json:"audioCodec"`
|
|
|
|
Encoder string `json:"encoder"`
|
2020-11-18 08:21:19 +03:00
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
VideoBitrate int `json:"videoBitrate"`
|
|
|
|
AudioBitrate int `json:"audioBitrate"`
|
2023-05-30 20:31:43 +03:00
|
|
|
VideoFramerate float32 `json:"framerate"`
|
2020-12-02 11:19:55 +03:00
|
|
|
VideoOnly bool `json:"-"`
|
2020-10-02 10:12:47 +03:00
|
|
|
}
|
|
|
|
|
2020-11-13 02:14:59 +03:00
|
|
|
// RTMPStreamMetadata is the raw metadata that comes in with a RTMP connection.
|
2020-10-02 10:12:47 +03:00
|
|
|
type RTMPStreamMetadata struct {
|
2023-05-30 20:31:43 +03:00
|
|
|
VideoCodec interface{} `json:"videocodecid"`
|
|
|
|
AudioCodec interface{} `json:"audiocodecid"`
|
|
|
|
Encoder string `json:"encoder"`
|
2020-10-02 10:12:47 +03:00
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
VideoBitrate float32 `json:"videodatarate"`
|
2020-11-18 08:21:19 +03:00
|
|
|
VideoFramerate float32 `json:"framerate"`
|
2020-10-02 10:12:47 +03:00
|
|
|
AudioBitrate float32 `json:"audiodatarate"`
|
|
|
|
}
|