2025-03-26 16:30:50 +05:00

20 lines
462 B
Go

package storage
import (
"git.insit.tech/sas/rtsp_proxy/proto/common"
"time"
)
// CreateFileName creates FileName structure.
func CreateFileName(dirData string, resolutions []string, cutURI string, period int) *common.FileName {
fn := common.FileName{
Path: dirData + "/" + cutURI + "/" + resolutions[0],
TimeNow: time.Now().Format("15-04-05_02-01-2006"),
Name: "videoFragment",
Number: -1,
Duration: float64(period),
}
return &fn
}