From 09b570d64c389eec097e11d2e98613e043219aa7 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 17 Nov 2020 21:21:19 -0800 Subject: [PATCH] Support framerate to be a float. For #378 --- models/broadcaster.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/models/broadcaster.go b/models/broadcaster.go index cf2119b46..5ae343170 100644 --- a/models/broadcaster.go +++ b/models/broadcaster.go @@ -10,14 +10,14 @@ type Broadcaster struct { } 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"` + 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"` } // RTMPStreamMetadata is the raw metadata that comes in with a RTMP connection. @@ -26,7 +26,7 @@ type RTMPStreamMetadata struct { Height int `json:"height"` VideoBitrate float32 `json:"videodatarate"` VideoCodec interface{} `json:"videocodecid"` - VideoFramerate int `json:"framerate"` + VideoFramerate float32 `json:"framerate"` AudioBitrate float32 `json:"audiodatarate"` AudioCodec interface{} `json:"audiocodecid"` Encoder string `json:"encoder"`