mirror of
https://github.com/owncast/owncast.git
synced 2024-11-27 09:45:36 +03:00
27 lines
538 B
Go
27 lines
538 B
Go
package replays
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
type HLSOutputConfiguration struct {
|
|
ID string
|
|
StreamId string
|
|
VariantId string
|
|
Name string
|
|
VideoBitrate int
|
|
ScaledWidth int
|
|
ScaledHeight int
|
|
Framerate int
|
|
SegmentDuration float64
|
|
}
|
|
|
|
func (config *HLSOutputConfiguration) Validate() error {
|
|
if config.VideoBitrate == 0 {
|
|
return errors.New("video bitrate is unavailable")
|
|
}
|
|
|
|
if config.Framerate == 0 {
|
|
return errors.New("video framerate is unavailable")
|
|
}
|
|
|
|
return nil
|
|
}
|