代码初始化
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
package video
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// ConcatReq 视频拼接请求(JSON body / URL 方式)
|
||||
type ConcatReq struct {
|
||||
g.Meta `path:"/concat" method:"post" tags:"视频拼接" summary:"视频拼接(URL模式)" dc:"从视频URL下载并拼接"`
|
||||
VideoURLs []string `json:"video_urls" v:"required#视频URL列表不能为空" dc:"视频URL列表(按此顺序拼接)"`
|
||||
Method string `json:"method" dc:"拼接方式(auto/fast/reencode)" d:"auto"`
|
||||
Upload bool `json:"upload" dc:"是否上传到MinIO" d:"false"`
|
||||
}
|
||||
|
||||
// ConcatUploadReq 视频拼接请求(文件上传模式)
|
||||
type ConcatUploadReq struct {
|
||||
g.Meta `path:"/concat/upload" method:"post" tags:"视频拼接" summary:"视频拼接(文件上传)" dc:"上传视频文件并拼接(至少2个视频)"`
|
||||
Method string `json:"method" dc:"拼接方式(auto/fast/reencode)" d:"auto"`
|
||||
Upload bool `json:"upload" dc:"是否上传到MinIO" d:"false"`
|
||||
}
|
||||
|
||||
// ConcatRes 视频拼接响应
|
||||
@@ -14,4 +25,21 @@ type ConcatRes struct {
|
||||
DurationStr string `json:"durationStr" dc:"可读时长"`
|
||||
MethodUsed string `json:"methodUsed" dc:"实际使用的拼接方式"`
|
||||
InputFiles int `json:"inputFiles" dc:"输入文件数"`
|
||||
FileURL string `json:"fileURL" dc:"MinIO访问地址(上传后返回)"`
|
||||
}
|
||||
|
||||
// UploadFileBytesReq 上传文件请求(字节流)
|
||||
type UploadFileBytesReq struct {
|
||||
FileName string `json:"fileName" dc:"文件名"`
|
||||
FileBytes []byte `json:"fileBytes" dc:"文件字节流"`
|
||||
FileStoreURL string `json:"fileStoreURL" dc:"文件存储路径"`
|
||||
}
|
||||
|
||||
// UploadFileBytesRes 上传文件响应
|
||||
type UploadFileBytesRes struct {
|
||||
FileURL string `json:"fileURL" dc:"上传地址"`
|
||||
FileSize int `json:"fileSize" dc:"文件大小"`
|
||||
FileName string `json:"fileName" dc:"文件名称"`
|
||||
FileFormat string `json:"fileFormat" dc:"文件格式"`
|
||||
FileAddressPrefix string `json:"fileAddressPrefix"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user