Documentation
¶
Index ¶
- Constants
- func CheckTaskComplete(videoKey string) bool
- func CheckTaskExist(videoKey string) bool
- func CheckTaskStart(videoKey string) bool
- func CheckVideoExist(info VideoClipInfo) bool
- func DeleteTask(videoKey string) error
- func DeleteVideoClips(videoKey string) error
- func InsertTask(videoKey string) error
- func InsertVideo(info VideoClipInfo) error
- func UnsetTaskEncodeKey(videoKey string) error
- func UnsetVideoClipEncodeKey(info VideoClipInfo) error
- func UpdateTask(filter Task, update Task) error
- func UpdateVideoClip(filter VideoClipInfo, update VideoClipInfo) error
- type Task
- type VideoClipInfo
- type VideoProgressITEM
Constants ¶
View Source
const ( VIDEO_COLLECTION = "video" TASK_COLLECTION = "task" )
Variables ¶
This section is empty.
Functions ¶
func CheckTaskComplete ¶
CheckTaskComplete checks if a task has completed
func CheckTaskExist ¶
CheckTaskExist checks if a task exists in the database
func CheckTaskStart ¶
CheckTaskStart checks if a task has started
func DeleteTask ¶
DeleteTask deletes a task from the database
func InsertTask ¶
InsertTask inserts a new uncompleted task into the database
func UnsetTaskEncodeKey ¶
UnsetTaskEncodeKey 清除任务的 EncodeKey
func UnsetVideoClipEncodeKey ¶
func UnsetVideoClipEncodeKey(info VideoClipInfo) error
UnsetVideoClipEncodeKey 清除视频切片的编码键
func UpdateTask ¶
UpdateTask updates an uncompleted task in the database
func UpdateVideoClip ¶
func UpdateVideoClip(filter VideoClipInfo, update VideoClipInfo) error
UpdateVideoClip 更新视频信息
Types ¶
type Task ¶
type Task struct {
Key string `bson:"key,omitempty"`
EncodeKey string `bson:"encode_key,omitempty"`
EncodeParam string `bson:"encode_param,omitempty"`
Script string `bson:"script,omitempty"`
CreatedAt time.Time `bson:"created_at,omitempty"`
}
type VideoClipInfo ¶
type VideoClipInfo struct {
Key string `bson:"key,omitempty"`
Index int `bson:"index,omitempty"`
Total int `bson:"total,omitempty"`
ClipKey string `bson:"clip_key,omitempty"`
EncodeKey string `bson:"encode_key,omitempty"`
TaskID string `bson:"task_id,omitempty"`
}
func GetVideoClip ¶
func GetVideoClip(info VideoClipInfo) (VideoClipInfo, error)
GetVideoClip 获取视频切片信息
func GetVideoClips ¶
func GetVideoClips(videoKey string) ([]VideoClipInfo, error)
GetVideoClips 获取所有视频切片信息,按照索引排序
type VideoProgressITEM ¶
type VideoProgressITEM struct {
Completed bool `json:"completed"`
Index int `json:"index"`
ClipKey string `json:"clip_key"`
ClipURL string `json:"clip_url"`
EncodeKey string `json:"encode_key"`
EncodeURL string `json:"encode_url"`
}
func GetVideoProgress ¶
func GetVideoProgress(videoKey string) ([]VideoProgressITEM, error)
GetVideoProgress 获取视频处理进度和每个切片的状态
Click to show internal directories.
Click to hide internal directories.