Documentation
¶
Index ¶
- func ChangeImageDefaultSuffix(suffix string)
- func ChangeVideoDefaultSuffix(suffix string)
- func FillCommentFields(comment *models.Comment) error
- func FillCommentListFields(comments *[]*models.Comment) error
- func FillVideoListFields(userId int64, videos *[]*models.Video) (*time.Time, error)
- func GetDefaultImageSuffix() string
- func GetFileUrl(fileName string) string
- func NewFileName(userId int64) string
- func SaveImageFromVideo(name string, isDebug bool) error
- type Video2Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeImageDefaultSuffix ¶
func ChangeImageDefaultSuffix(suffix string)
func ChangeVideoDefaultSuffix ¶
func ChangeVideoDefaultSuffix(suffix string)
func FillCommentFields ¶
func FillCommentListFields ¶
func FillVideoListFields ¶
FillVideoListFields 填充每个视频的作者信息(因为作者与视频的一对多关系,数据库中存下的是作者的id 当userId>0时,我们判断当前为登录状态,其余情况为未登录状态,则不需要填充IsFavorite字段
func GetDefaultImageSuffix ¶
func GetDefaultImageSuffix() string
func GetFileUrl ¶
func SaveImageFromVideo ¶
SaveImageFromVideo 将视频切一帧保存到本地 isDebug用于控制是否打印出执行的ffmepg命令
Types ¶
type Video2Image ¶
type Video2Image struct { InputPath string OutputPath string StartTime string KeepTime string Filter string FrameCount int64 // contains filtered or unexported fields }
func NewVideo2Image ¶
func NewVideo2Image() *Video2Image
func (*Video2Image) Debug ¶
func (v *Video2Image) Debug()
func (*Video2Image) ExecCommand ¶
func (v *Video2Image) ExecCommand(cmd string) error
func (*Video2Image) GetQueryString ¶
func (v *Video2Image) GetQueryString() (ret string, err error)
Click to show internal directories.
Click to hide internal directories.