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