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