2023-08-10 02:19:09 +03:00
|
|
|
package replays
|
|
|
|
|
2023-08-12 00:53:18 +03:00
|
|
|
import "github.com/pkg/errors"
|
|
|
|
|
2023-08-10 02:19:09 +03:00
|
|
|
type HLSOutputConfiguration struct {
|
|
|
|
ID string
|
|
|
|
StreamId string
|
|
|
|
VariantId string
|
|
|
|
Name string
|
|
|
|
VideoBitrate int
|
|
|
|
ScaledWidth int
|
|
|
|
ScaledHeight int
|
|
|
|
Framerate int
|
|
|
|
SegmentDuration float64
|
|
|
|
}
|
2023-08-12 00:53:18 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|