20 lines
478 B
Go
20 lines
478 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, number int) *common.FileName {
|
|
fn := common.FileName{
|
|
Path: dirData + "/" + cutURI + "/" + resolutions[0],
|
|
TimeNow: time.Now().Format("15-04-05_02-01-2006"),
|
|
Name: "videoFragment",
|
|
Number: number,
|
|
Duration: float64(period),
|
|
}
|
|
|
|
return &fn
|
|
}
|