owncast/models/broadcaster.go
Gabe Kangas f4fdc6c951
Current broadcaster details admin api (#206)
* Add support for ending the inbound stream. Closes #191

* Add a simple success response to API requests

* Store inbound broadcast details for admin purposes

* Add /api/admin/broadcaster endpoint

* Reset broadcaster on disconnect

* Move controller to admin directory
2020-10-02 00:12:47 -07:00

34 lines
1.1 KiB
Go

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 {
Width int `json:"width"`
Height int `json:"height"`
VideoFramerate int `json:"framerate"`
VideoBitrate int `json:"videoBitrate"`
VideoCodec string `json:"videoCodec"`
AudioBitrate int `json:"audioBitrate"`
AudioCodec string `json:"audioCodec"`
Encoder string `json:"encoder"`
}
// RTMPStreamMetadata is the raw metadata that comes in with a RTMP connection
type RTMPStreamMetadata struct {
Width int `json:"width"`
Height int `json:"height"`
VideoBitrate float32 `json:"videodatarate"`
VideoCodec interface{} `json:"videocodecid"`
VideoFramerate int `json:"framerate"`
AudioBitrate float32 `json:"audiodatarate"`
AudioCodec interface{} `json:"audiocodecid"`
Encoder string `json:"encoder"`
}