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