Documentation
¶
Overview ¶
*
//转码状态 http://mts.cn-hangzhou.aliyuncs.com/?Action=QueryJobList&JobIds=88c6ca184c0e47098a5b665e2a126797&<公共参数>
Index ¶
- Constants
- type AudioStream
- type AudioStreamList
- type CallbackParam
- type ConfigStruct
- type Error
- type Format
- type HeadReq
- type Job
- type JobList
- type JobQuery
- type JobResult
- type JobResultList
- type MediaInfo
- type MediaInfoResult
- type NetworkCost
- type Object
- type OssFile
- func (of *OssFile) FileUpload(fileResult *data.FileResult, data *data.FileName, bucket *oss.Bucket) error
- func (of *OssFile) IsObjectExist(data *data.FileName) (bool, error)
- func (of *OssFile) StreamUpload(fileResult *data2.FileResult, data *data2.FileStream, bucket *oss.Bucket) error
- func (of *OssFile) UploadFile(fileResult *data.FileResult, data *data.FileName) error
- func (of *OssFile) UploadStream(fileResult *data.FileResult, data *data.FileStream) error
- type Output
- type OutputObject
- type PolicyToken
- type Properties
- type QueryJobResult
- type QueryReq
- type Snapshot
- type SnapshotConfig
- type SnapshotConfigReq
- type SnapshotResult
- type Streams
- type SubOut
- type SubmitMediaInfoReq
- type SubmitReq
- type SubmitResult
- type SubmitSnapshotReq
- type SubtitleStream
- type SubtitleStreamList
- type TileOut
- type VideoStream
- type VideoStreamList
- type WaterMark
- type WaterMarkList
Constants ¶
View Source
const DefaultCallbackBody = "filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}"
View Source
const DefaultCallbackBodyType = "application/x-www-form-urlencoded"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioStream ¶
type AudioStream struct { Index string CodecName string CodecLongName string Profile string CodecTimeBase string CodecTagString string CodecTag string SampleFmt string Samplerate string Channels string ChannelLayout string Timebase string StartTime string Duration string Bitrate string NumFrames string Lang string }
type AudioStreamList ¶
type AudioStreamList struct {
AudioStreams []AudioStream `json:"AudioStream,omitempty"`
}
type CallbackParam ¶ added in v0.5.31
type CallbackParam struct { CallbackUrl string `json:"callbackUrl"` CallbackBody string `json:"callbackBody"` CallbackBodyType string `json:"callbackBodyType"` }
func GetCallbackParam ¶ added in v0.5.31
func GetCallbackParam(callback string) CallbackParam
type ConfigStruct ¶ added in v0.5.31
type HeadReq ¶
type HeadReq struct { Format string // 返回值的类型,支持JSON与XML,默认为XML。 AccessKeyId string // 阿里云颁发给用户的访问服务所用的密钥ID。 Signature string // 签名结果串,关于签名的计算方法,参见 签名机制。 SignatureMethod string // 签名方式,目前支持HMAC-SHA1。 Timestamp string // 请求的时间戳。日期格式按照ISO8601标准表示,并需要使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ例如,2014-7-29T12:00:00Z(为北京时间2014年7月29日的20点0分0秒。 SignatureVersion string // 签名算法版本,目前版本是1.0。 SignatureNonce string // 唯一随机数,用于防止网络重放攻击。用户在不同请求间要使用不同的随机数值。 // contains filtered or unexported fields }
type JobResultList ¶
type JobResultList struct {
JobResults []JobResult `json:"JobResult"`
}
type MediaInfo ¶
type MediaInfo struct { JobId string Input Object Properties Properties }
MediaInfo 媒体信息
type MediaInfoResult ¶
媒体信息返回结果
type NetworkCost ¶
type OssFile ¶
type OssFile struct {
// contains filtered or unexported fields
}
func NewOssFile ¶
func (*OssFile) FileUpload ¶
func (of *OssFile) FileUpload(fileResult *data.FileResult, data *data.FileName, bucket *oss.Bucket) error
FileUpload 文件上传
func (*OssFile) IsObjectExist ¶
IsObjectExist 文件是否存在
func (*OssFile) StreamUpload ¶
func (of *OssFile) StreamUpload(fileResult *data2.FileResult, data *data2.FileStream, bucket *oss.Bucket) error
StreamUpload 流式上传
func (*OssFile) UploadFile ¶
func (*OssFile) UploadStream ¶
func (of *OssFile) UploadStream(fileResult *data.FileResult, data *data.FileStream) error
type Output ¶
type Output struct { OutputFile Object `json:"OutputFile,omitempty"` TemplateId string `json:"TemplateId,omitempty"` UserData string `json:"UserData,omitempty"` Properties Properties `json:"Properties,omitempty"` WaterMarkList WaterMarkList `json:"WaterMarkList,omitempty"` }
type OutputObject ¶
type PolicyToken ¶ added in v0.5.31
type PolicyToken struct { AccessKeyId string `json:"accessId"` Host string `json:"host"` Expire int64 `json:"expire"` Signature string `json:"signature"` Policy string `json:"policy"` Directory string `json:"dir"` Callback string `json:"callback"` }
func GetPolicyToken ¶ added in v0.5.31
func GetPolicyToken(access config.Access, objBucketInfo config.BucketInfo, callbackParam CallbackParam, uploadDir string, ttl int64) (PolicyToken, error)
GetPolicyToken 产生一个临时的上传token
type Properties ¶
type Properties struct {
Streams Streams
}
type SnapshotConfig ¶
type SnapshotConfigReq ¶
type SnapshotConfigReq struct { Format string BlackLevel string OutputFile Object TileOutputFile Object Interval string Num string Width string Height string FrameType string TileOut TileOut SubOut SubOut }
SnapshotConfigReq
BlackLevel 多帧截图针对首帧过滤黑屏图片判定阀值。
默认值:空 取值范围:[30,100] 值越小,图片黑色像素的占比越小。 Time>0 ,参数设置无效,放弃过滤黑屏功能; Time =0 ,Num>1,参数有效,且只作用于第一张图,只检测开始5秒数据,如果没有非黑屏图片,依旧返回第一帧黑屏图片; Time =0 ,Num=1,强制过滤黑屏,参数无效。 如果需要首帧图片过滤纯黑屏,建议参数值设置成100。 使用示例:Time=0&Num=10 需要对首图做纯黑屏过滤,则设置BlackLevel= 100。
*
type SnapshotResult ¶
截图返回结果
type Streams ¶
type Streams struct { Format Format State string Code string Message string PipelineId string CreationTime string UserData string VideoStreamList VideoStreamList `json:"VideoStreamList,omitempty"` AudioStreamList AudioStreamList `json:"AudioStreamList,omitempty"` SubtitleStreamList SubtitleStreamList `json:"SubtitleStreamList,omitempty"` }
type SubmitMediaInfoReq ¶
SubmitMediaInfoReq Action = SubmitMediaInfo
type SubmitReq ¶
type SubmitReq struct { Action string Input Object `json:"Input"` OutputBucket string OutputLocation string Outputs []OutputObject PipelineId string }
SubmitReq Action = SubmitJobs
type SubmitResult ¶
type SubmitResult struct { RequestId string JobResult JobResultList `json:"JobResultList"` }
提交转码返回结果
type SubmitSnapshotReq ¶
type SubmitSnapshotReq struct { Action string Input Object `json:"Input"` Config SnapshotConfigReq `json:"SnapshotConfig"` PipelineId string UserData string }
SubmitSnapshotReq Action = SubmitSnapshotJob
type SubtitleStream ¶
type SubtitleStreamList ¶
type SubtitleStreamList struct {
SubtitleStreams []SubtitleStream `json:"SubtitleStream,omitempty"`
}
type TileOut ¶
type TileOut struct { Lines string // 图片拼合行数, 取值范围:(0,10000], 默认:10 Columns string // 图片拼合列数, 取值范围:(0,10000], 默认:10 CellWidth string // 单图片宽度。默认截图输出分辨率宽度。 CellHeight string // 单图片高度。 默认截图输出分辨率高度。 Margin string // 外框宽度。 Padding string // 图片间距,默认0,单位px Color string // 背景颜色。 默认:black, 其中颜色关键字支持三种格式,比如黑色,支持Black,black,#000000 IsKeepCellPic string // 是否保留单图片。 取值范围:true、false, 默认:true }
type VideoStream ¶
type VideoStream struct { Index string CodecName string CodecLongName string Profile string CodecTimeBase string CodecTagString string CodecTag string Width string Height string HasBFrames string Sar string Dar string PixFmt string Level string Fps string AvgFPS string Timebase string StartTime string Duration string Bitrate string NumFrames string Lang string NetworkCost NetworkCost }
type VideoStreamList ¶
type VideoStreamList struct {
VideoStreams []VideoStream `json:"VideoStream,omitempty"`
}
type WaterMarkList ¶
type WaterMarkList struct {
WaterMarks []WaterMark `json:"WaterMark,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.