You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.9 KiB
72 lines
1.9 KiB
package vo
|
|
|
|
import (
|
|
"time"
|
|
|
|
"laic-backend/common"
|
|
"laic-backend/model"
|
|
)
|
|
|
|
// LivePageReq 直播会话分页
|
|
type LivePageReq struct {
|
|
common.Pagination
|
|
Phase string `json:"phase" form:"phase"` // idle / starting / streaming / stopped
|
|
}
|
|
|
|
// LiveStartReq 启动直播推流
|
|
type LiveStartReq struct {
|
|
MaxBitrateBps int64 `json:"maxBitrateBps"`
|
|
}
|
|
|
|
// LiveSessionCreateReq 创建或加入指定机巢的活动直播会话。
|
|
type LiveSessionCreateReq struct {
|
|
MaxBitrateBps int64 `json:"maxBitrateBps"`
|
|
}
|
|
|
|
// LiveSessionVO 返回会话和当前用户租约。
|
|
type LiveSessionVO struct {
|
|
Session *model.LiveSession `json:"session"`
|
|
LeaseExpiresAt int64 `json:"leaseExpiresAt"`
|
|
}
|
|
|
|
// LivePlayURLVO 直播播放地址
|
|
type LivePlayURLVO struct {
|
|
StreamName string `json:"streamName"`
|
|
PlayURL string `json:"playUrl"`
|
|
ExpiresAt int64 `json:"expiresAt"`
|
|
}
|
|
|
|
// VideoUploadReq 申请视频上传
|
|
type VideoUploadReq struct {
|
|
FileName string `json:"fileName" validate:"required,max=256"`
|
|
FileSize int64 `json:"fileSize"`
|
|
DroneSN string `json:"droneSn" validate:"max=32"`
|
|
ExecutionID int64 `json:"executionId"`
|
|
}
|
|
|
|
// VideoUploadVO 上传申请结果(含 OSS 预签名 PUT URL)
|
|
type VideoUploadVO struct {
|
|
Video *model.Video `json:"video"`
|
|
UploadURL string `json:"uploadUrl"`
|
|
ExpireAt *time.Time `json:"expireAt"`
|
|
}
|
|
|
|
// VideoPageReq 视频分页
|
|
type VideoPageReq struct {
|
|
common.Pagination
|
|
Keyword string `json:"keyword" form:"keyword"` // 匹配 file_name
|
|
Status string `json:"status" form:"status"`
|
|
}
|
|
|
|
// VideoCompleteReq 上传完成确认
|
|
type VideoCompleteReq struct {
|
|
FileSize int64 `json:"fileSize"`
|
|
Duration int `json:"duration"`
|
|
}
|
|
|
|
// VideoDownloadVO 下载结果(含 OSS 预签名 GET URL)
|
|
type VideoDownloadVO struct {
|
|
DownloadURL string `json:"downloadUrl"`
|
|
ExpireAt int64 `json:"expireAt"`
|
|
Bytes int64 `json:"bytes"`
|
|
}
|
|
|