broadcaster.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package models
  2. import "time"
  3. // Broadcaster represents the details around the inbound broadcasting connection.
  4. type Broadcaster struct {
  5. RemoteAddr string `json:"remoteAddr"`
  6. StreamDetails InboundStreamDetails `json:"streamDetails"`
  7. Time time.Time `json:"time"`
  8. }
  9. // InboundStreamDetails represents an inbound broadcast stream.
  10. type InboundStreamDetails struct {
  11. Width int `json:"width"`
  12. Height int `json:"height"`
  13. VideoFramerate float32 `json:"framerate"`
  14. VideoBitrate int `json:"videoBitrate"`
  15. VideoCodec string `json:"videoCodec"`
  16. AudioBitrate int `json:"audioBitrate"`
  17. AudioCodec string `json:"audioCodec"`
  18. Encoder string `json:"encoder"`
  19. VideoOnly bool `json:"-"`
  20. }
  21. // RTMPStreamMetadata is the raw metadata that comes in with a RTMP connection.
  22. type RTMPStreamMetadata struct {
  23. Width int `json:"width"`
  24. Height int `json:"height"`
  25. VideoBitrate float32 `json:"videodatarate"`
  26. VideoCodec interface{} `json:"videocodecid"`
  27. VideoFramerate float32 `json:"framerate"`
  28. AudioBitrate float32 `json:"audiodatarate"`
  29. AudioCodec interface{} `json:"audiocodecid"`
  30. Encoder string `json:"encoder"`
  31. }