2020-10-02 10:12:47 +03: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"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type InboundStreamDetails struct {
|
2020-11-18 08:21:19 +03: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 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 {
|
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
VideoBitrate float32 `json:"videodatarate"`
|
|
|
|
VideoCodec interface{} `json:"videocodecid"`
|
2020-11-18 08:21:19 +03:00
|
|
|
VideoFramerate float32 `json:"framerate"`
|
2020-10-02 10:12:47 +03:00
|
|
|
AudioBitrate float32 `json:"audiodatarate"`
|
|
|
|
AudioCodec interface{} `json:"audiocodecid"`
|
|
|
|
Encoder string `json:"encoder"`
|
|
|
|
}
|