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"` } // LiveStopReq 停止直播。streamSessionId 建议携带:省略时为兼容旧客户端的 // “停止当前活动会话”,携带时必须与当前活动会话一致,避免旧页面停掉新会话。 type LiveStopReq struct { StreamSessionID string `json:"streamSessionId"` } // LiveSessionCreateReq 创建或加入指定机巢的活动直播会话。 type LiveSessionCreateReq struct { MaxBitrateBps int64 `json:"maxBitrateBps"` } // LiveSessionVO 返回会话和当前用户租约。 type LiveSessionVO struct { Session *model.LiveSession `json:"session"` LeaseExpiresAt int64 `json:"leaseExpiresAt"` } // LivePlayURLVO 直播播放地址。playUrl 保留 HLS 以兼容旧前端; // 实时监控建议用 playUrlFlv(mpegts.js),延迟远低于 HLS。 type LivePlayURLVO struct { StreamName string `json:"streamName"` PlayURL string `json:"playUrl"` PlayURLHLS string `json:"playUrlHls"` PlayURLFLV string `json:"playUrlFlv"` PlayURLRTMP string `json:"playUrlRtmp"` 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"` }