Documentation ¶
Index ¶
- Constants
- func CreateNotification(cli bce.Client, name, endpoint string) error
- func CreatePipeline(cli bce.Client, pipelineName, sourceBucket, targetBucket string, capacity int) error
- func CreatePipelineCustomize()
- func CreatePreset(cli bce.Client, presetName, description, container string) error
- func CreatePrestCustomize(cli bce.Client, preset *Preset) error
- func DeleteNotification(cli bce.Client, name string) error
- func DeletePipeline(cli bce.Client, pipelineName string) error
- func DeleteWaterMark(cli bce.Client, watermarkId string) error
- func UpdatePipeline(cli bce.Client, pipelineName string, updatePipelineArgs *UpdatePipelineArgs) error
- func UpdatePreset(cli bce.Client, preset *Preset) error
- type Area
- type Audio
- type AudioInfo
- type Clip
- type CodecOptions
- type CreateJobArgs
- type CreateJobResponse
- func CreateJob(cli bce.Client, pipelineName, sourceKey, targetKey, presetName string) (*CreateJobResponse, error)
- func CreateJobCustomize(cli bce.Client, args *CreateJobArgs) (*CreateJobResponse, error)
- func CreateThumbnailJob(cli bce.Client, pipelineName, sourceKey string, ...) (*CreateJobResponse, error)
- type CreateNotificationArgs
- type CreatePiplineArgs
- type CreatePiplineConfig
- type CreateThumbnailJobArgs
- type CreateWaterMarkArgs
- type CreateWaterMarkResponse
- type Encryption
- type Error
- type ExtraCfg
- type Font
- type GetMediaInfoOfFileResponse
- type GetPresetResponse
- type GetThumbnailJobResponse
- type GetTranscodingJobResponse
- type GetWaterMarkResponse
- type HighlightOutputCfg
- type Insert
- type Job
- type JobStatus
- type Layout
- type ListNotificationsResponse
- type ListPipelinesResponse
- type ListPresetsResponse
- type ListThumbnailJobsResponse
- type ListTranscodingJobsResponse
- type ListWaterMarkResponse
- type PipelineStatus
- type Preset
- type Source
- type SourceClip
- type SpriteOutputCfg
- type Target
- type ThumbnailCapture
- type ThumbnailJobStatus
- type ThumbnailOptional
- type ThumbnailSource
- type ThumbnailTarget
- type ThumbnailTargetStatus
- type Timeline
- type TransCfg
- type UpdatePipelineArgs
- type UpdatePipelineConfig
- type Video
- type VideoInfo
- type VolumeAdjust
- type Watermark
- type Watermarks
Constants ¶
View Source
const ( MEDIA_PREFIX = bce.URI_PREFIX + "v3/" PIPLINE = "pipeline" TRANSCODING_JOB = "job/transcoding" PRESET = "preset" MEDIA_INFO = "mediainfo" THUMBNAIL = "job/thumbnail" WATERMARK = "watermark" NOTIFICATION = "notification" )
Variables ¶
This section is empty.
Functions ¶
func CreatePipeline ¶
func CreatePipelineCustomize ¶
func CreatePipelineCustomize()
func CreatePreset ¶
func UpdatePipeline ¶
func UpdatePipeline(cli bce.Client, pipelineName string, updatePipelineArgs *UpdatePipelineArgs) error
Types ¶
type Audio ¶
type Audio struct { BitRateInBps int `json:"bitRateInBps,omitempty"` SampleRateInHz int `json:"sampleRateInHz,omitempty"` Channels int `json:"channels,omitempty"` PcmFormat string `json:"pcmFormat,omitempty"` VolumeAdjust *VolumeAdjust `json:"volumeAdjust,omitempty"` Codec string `json:"code,omitemptyc"` }
type CodecOptions ¶
type CodecOptions struct {
Profile string `json:"profile,omitempty"`
}
type CreateJobArgs ¶
type CreateJobResponse ¶
type CreateJobResponse struct {
JobId string `json:"jobId"`
}
func CreateJob ¶
func CreateJob(cli bce.Client, pipelineName, sourceKey, targetKey, presetName string) (*CreateJobResponse, error)
func CreateJobCustomize ¶
func CreateJobCustomize(cli bce.Client, args *CreateJobArgs) (*CreateJobResponse, error)
func CreateThumbnailJob ¶
func CreateThumbnailJob(cli bce.Client, pipelineName, sourceKey string, createThumbnialArgs *CreateThumbnailJobArgs) ( *CreateJobResponse, error)
type CreateNotificationArgs ¶
type CreateNotificationArgs struct { Name string `json:"name,omitempty"` Endpoint string `json:"endpoint,omitempty"` }
func GetNotification ¶
func GetNotification(cli bce.Client, name string) (*CreateNotificationArgs, error)
type CreatePiplineArgs ¶
type CreatePiplineArgs struct { PipelineName string `json:"pipelineName"` Description string `json:"description,omitempty"` SourceBucket string `json:"sourceBucket"` TargetBucket string `json:"targetBucket"` Config *CreatePiplineConfig `json:"config"` }
create pipline args
type CreatePiplineConfig ¶
type CreateThumbnailJobArgs ¶
type CreateThumbnailJobArgs struct { PipelineName string `json:"pipelineName,omitempty"` ThumbnailSource *ThumbnailSource `json:"source"` PresetName string `json:"presetName,omitempty"` ThumbnailTarget *ThumbnailTarget `json:"target,omitempty"` ThumbnailCapture *ThumbnailCapture `json:"capture,omitempty"` Area *Area `json:"delogoArea,omitempty"` Crop *Area `json:"crop,omitempty"` }
type CreateWaterMarkArgs ¶
type CreateWaterMarkArgs struct { Bucket string `json:"bucket,omitempty"` Key string `json:"key,omitempty"` VerticalAlignment string `json:"verticalAlignment,omitempty"` HorizontalAlignment string `json:"horizontalAlignment,omitempty"` VerticalOffsetInPixel int `json:"verticalOffsetInPixel,omitempty"` HorizontalOffsetInPixel int `json:"horizontalOffsetInPixel,omitempty"` Timeline *Timeline `json:"timeline,omitempty"` Repeated int `json:"repeated,omitempty"` AllowScaling bool `json:"allowScaling,omitempty"` Dx string `json:"dx,omitempty"` Dy string `json:"dy,omitempty"` Width string `json:"width,omitempty"` Height string `json:"height,omitempty"` }
type CreateWaterMarkResponse ¶
type CreateWaterMarkResponse struct {
WatermarkId string `json:"watermarkId"`
}
func CreateWaterMark ¶
func CreateWaterMark(cli bce.Client, watermark *CreateWaterMarkArgs) (*CreateWaterMarkResponse, error)
type Encryption ¶
type GetMediaInfoOfFileResponse ¶
type GetMediaInfoOfFileResponse struct { Bucket string `json:"bucket"` Key string `json:"key"` FileSizeInByte int `json:"fileSizeInByte"` Container string `json:"container"` DurationInSecond int `json:"durationInSecond"` DurationInMillisecond int `json:"durationInMillisecond"` Etag string `json:"etag"` Type string `json:"type"` VideoInfo *VideoInfo `json:"video"` AudioInfo *AudioInfo `json:"audio"` }
func GetMediaInfoOfFile ¶
func GetMediaInfoOfFile(cli bce.Client, bucket, key string) (*GetMediaInfoOfFileResponse, error)
type GetPresetResponse ¶
type GetPresetResponse struct { PresetName string `json:"presetName"` Description string `json:"description"` Container string `json:"container"` Transmux bool `json:"transmux"` Clip Clip `json:"clip"` Audio Audio `json:"audio"` Video *Video `json:"video"` Encryption *Encryption `json:"encryption"` WatermarkID string `json:"watermarkId"` Watermarks *Watermarks `json:"watermarks"` TransCfg *TransCfg `json:"transCfg"` ExtraCfg *ExtraCfg `json:"extraCfg"` State string `json:"state"` CreatedTime string `json:"createdTime"` }
type GetThumbnailJobResponse ¶
type GetThumbnailJobResponse struct { JobID string `json:"jobId,omitempty"` JobStatus string `json:"jobStatus,omitempty"` PipelineName string `json:"pipelineName,omitempty"` Source *ThumbnailSource `json:"source,omitempty"` PresetName string `json:"presetName,omitempty"` Target *ThumbnailTargetStatus `json:"target,omitempty"` Capture *ThumbnailCapture `json:"capture,omitempty"` DelogoArea *Area `json:"delogoArea,omitempty"` Error *Error `json:"error,omitempty"` }
func GetThumbanilJob ¶
func GetThumbanilJob(cli bce.Client, jobId string) (*GetThumbnailJobResponse, error)
type GetTranscodingJobResponse ¶
type GetTranscodingJobResponse struct { JobID string `json:"jobId"` PipelineName string `json:"pipelineName"` Source Source `json:"source"` Target Target `json:"target"` JobStatus string `json:"jobStatus"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` Error Error `json:"error"` }
func GetTranscodingJob ¶
func GetTranscodingJob(cli bce.Client, jobId string) (*GetTranscodingJobResponse, error)
type GetWaterMarkResponse ¶
type GetWaterMarkResponse struct { Bucket string `json:"bucket"` Key string `json:"key"` VerticalAlignment string `json:"verticalAlignment"` HorizontalAlignment string `json:"horizontalAlignment"` VerticalOffsetInPixel int `json:"verticalOffsetInPixel"` HorizontalOffsetInPixel int `json:"horizontalOffsetInPixel"` Timeline *Timeline `json:"timeline"` Repeated int `json:"repeated"` AllowScaling bool `json:"allowScaling"` Dx string `json:"dx"` Dy string `json:"dy"` Width string `json:"width"` Height string `json:"height"` }
func GetWaterMark ¶
func GetWaterMark(cli bce.Client, watermarkId string) (*GetWaterMarkResponse, error)
type HighlightOutputCfg ¶
type ListNotificationsResponse ¶
type ListNotificationsResponse struct {
Notifications []CreateNotificationArgs `json:"notifications"`
}
func ListNotification ¶
func ListNotification(cli bce.Client) (*ListNotificationsResponse, error)
type ListPipelinesResponse ¶
type ListPipelinesResponse struct {
Pipelines []PipelineStatus `json:"pipelines"`
}
func ListPipelines ¶
func ListPipelines(cli bce.Client) (*ListPipelinesResponse, error)
type ListPresetsResponse ¶
type ListPresetsResponse struct {
Presets []Preset `json:"presets"`
}
func ListPresets ¶
func ListPresets(cli bce.Client) (*ListPresetsResponse, error)
type ListThumbnailJobsResponse ¶
type ListThumbnailJobsResponse struct {
Thumbnails []ThumbnailJobStatus `json:"thumbnails"`
}
func ListThumbnailJobs ¶
func ListThumbnailJobs(cli bce.Client, pipelineName string) (*ListThumbnailJobsResponse, error)
type ListTranscodingJobsResponse ¶
type ListTranscodingJobsResponse struct {
Jobs []Job `json:"jobs"`
}
func ListTranscodingJobs ¶
func ListTranscodingJobs(cli bce.Client, pipelineName string) (*ListTranscodingJobsResponse, error)
type ListWaterMarkResponse ¶
type ListWaterMarkResponse struct {
Watermarks []Watermark `json:"watermarks"`
}
func ListWaterMark ¶
func ListWaterMark(cli bce.Client) (*ListWaterMarkResponse, error)
type PipelineStatus ¶
type PipelineStatus struct { PipelineName string `json:"pipelineName"` Description string `json:"description,omitempty"` SourceBucket string `json:"sourceBucket"` TargetBucket string `json:"targetBucket"` Config CreatePiplineConfig `json:"config"` State string `json:"state,omitempty"` Createtime string `json:"createtime,omitempty"` JobStatus JobStatus `json:"jobStatus,omitempty"` }
func GetPipeline ¶
func GetPipeline(cli bce.Client, pipelineName string) (*PipelineStatus, error)
type Preset ¶
type Preset struct { PresetName string `json:"presetName,omitempty"` Description string `json:"description,omitempty"` Container string `json:"container,omitempty"` Transmux bool `json:"transmux,omitempty"` Clip *Clip `json:"clip,omitempty"` Audio *Audio `json:"audio,omitempty"` Video *Video `json:"video,omitempty"` Encryption *Encryption `json:"encryption,omitempty"` WatermarkID string `json:"watermarkId,omitempty"` Watermarks *Watermarks `json:"watermarks,omitempty"` TransCfg *TransCfg `json:"transCfg,omitempty"` ExtraCfg *ExtraCfg `json:"extraCfg,omitempty"` State string `json:"state,omitempty"` CreatedTime string `json:"createdTime,omitempty"` }
type Source ¶
type Source struct { SourceKey string `json:"sourceKey,omitempty"` Clips *[]SourceClip `json:"clips,omitempty"` }
type SourceClip ¶
type SourceClip struct { Bucket string `json:"bucket,omitempty"` SourceKey string `json:"sourceKey,omitempty"` StartTimeInSecond int `json:"startTimeInSecond,omitempty"` DurationInSecond int `json:"durationInSecond,omitempty"` StartTimeInMillisecond int `json:"startTimeInMillisecond,omitempty"` DurationInMillisecond int `json:"durationInMillisecond,omitempty"` EnableLogo bool `json:"enableLogo,omitempty"` AsMasterClip bool `json:"asMasterClip,omitempty"` EnableDelogo bool `json:"enableDelogo,omitempty"` EnableCrop bool `json:"enableCrop,omitempty"` }
type SpriteOutputCfg ¶
type Target ¶
type Target struct { TargetKey string `json:"targetKey,omitempty"` PresetName string `json:"presetName,omitempty"` AutoDelogo bool `json:"autoDelogo,omitempty"` DelogoMode string `json:"delogoMode,omitempty"` DelogoArea *Area `json:"delogoArea,omitempty"` DelogoAreas *[]Area `json:"delogoAreas,omitempty"` AutoCrop bool `json:"autoCrop,omitempty"` Crop *Area `json:"crop,omitempty"` WatermarkIds []string `json:"watermarkIds,omitempty"` Inserts *[]Insert `json:"inserts,omitempty"` }
type ThumbnailCapture ¶
type ThumbnailCapture struct { Mode string `json:"mode,omitempty"` StartTimeInSecond float64 `json:"startTimeInSecond,omitempty"` EndTimeInSecond float64 `json:"endTimeInSecond,omitempty"` IntervalInSecond float64 `json:"intervalInSecond,omitempty"` MinIntervalInSecond float64 `json:"minIntervalInSecond,omitempty"` FrameNumber int `json:"frameNumber,omitempty"` SkipBlackFrame bool `json:"skipBlackFrame,omitempty"` HighlightOutputCfg *HighlightOutputCfg `json:"highlightOutputCfg,omitempty"` SpriteOutputCfg *SpriteOutputCfg `json:"spriteOutputCfg,omitempty"` }
type ThumbnailJobStatus ¶
type ThumbnailJobStatus struct { JobID string `json:"jobId"` JobStatus string `json:"jobStatus"` PipelineName string `json:"pipelineName"` Source *ThumbnailSource `json:"source,omitempty"` Target *ThumbnailTargetStatus `json:"target,omitempty"` Capture *Area `json:"capture,omitempty"` DelogoArea *Area `json:"delogoArea,omitempty"` Error *Error `json:"error,omitempty"` }
type ThumbnailOptional ¶
type ThumbnailOptional struct { PresetName string Target *ThumbnailTarget Capture *ThumbnailCapture DelogoArea *Area Crop *Area ThumbnailSource *ThumbnailSource }
type ThumbnailSource ¶
type ThumbnailSource struct {
Key string `json:"key,omitempty"`
}
type ThumbnailTarget ¶
type ThumbnailTarget struct { KeyPrefix string `json:"keyPrefix,omitempty"` Format string `json:"format,omitempty"` FrameRate float64 `json:"frameRate,omitempty"` GifQuality string `json:"gifQuality,omitempty"` SizingPolicy string `json:"sizingPolicy,omitempty"` WidthInPixel int `json:"widthInPixel,omitempty"` HeightInPixel int `json:"heightInPixel,omitempty"` SpriteOutputCfg *SpriteOutputCfg `json:"spriteOutputCfg,omitempty"` }
type ThumbnailTargetStatus ¶
type ThumbnailTargetStatus struct { KeyPrefix string `json:"keyPrefix,omitempty"` Format string `json:"format,omitempty"` FrameRate float64 `json:"frameRate,omitempty"` GifQuality string `json:"gifQuality,omitempty"` SizingPolicy string `json:"sizingPolicy,omitempty"` WidthInPixel int `json:"widthInPixel,omitempty"` HeightInPixel int `json:"heightInPixel,omitempty"` SpriteOutputCfg *SpriteOutputCfg `json:"spriteOutputCfg,omitempty"` Keys []string `json:"keys,omitempty"` }
type UpdatePipelineArgs ¶
type UpdatePipelineArgs struct { PipelineName string `json:"pipelineName,omitempty"` Description string `json:"description,omitempty"` SourceBucket string `json:"sourceBucket,omitempty"` TargetBucket string `json:"targetBucket,omitempty"` UpdatePipelineConfig *UpdatePipelineConfig `json:"config,omitempty"` }
func GetPipelineUpdate ¶
func GetPipelineUpdate(cli bce.Client, pipelineName string) (*UpdatePipelineArgs, error)
type UpdatePipelineConfig ¶
type Video ¶
type Video struct { Codec string `json:"codec,omitempty"` CodecOptions *CodecOptions `json:"codecOptions,omitempty"` BitRateInBps int `json:"bitRateInBps,omitempty"` MaxFrameRate float64 `json:"maxFrameRate,omitempty"` MaxWidthInPixel int `json:"maxWidthInPixel,omitempty"` MaxHeigtInPixel int `json:"maxHeightInPixel,omitempty"` SizingPolicy string `json:"sizingPolicy,omitempty"` PlaybackSpeed float64 `json:"playbackSpeed,omitempty"` Crf int `json:"crf,omitempty"` AutoAdjustResolution bool `json:"autoAdjustResolution,omitempty"` }
type VolumeAdjust ¶
type Watermark ¶
type Watermark struct { Bucket string `json:"bucket"` Key string `json:"key"` VerticalOffsetInPixel int `json:"verticalOffsetInPixel"` HorizontalOffsetInPixel int `json:"horizontalOffsetInPixel"` WatermarkID string `json:"watermarkId"` CreateTime string `json:"createTime"` VerticalAlignment string `json:"verticalAlignment"` HorizontalAlignment string `json:"horizontalAlignment"` Dx string `json:"dx"` Dy string `json:"dy"` Width string `json:"width"` Height string `json:"height"` Timeline *Timeline `json:"timeline,omitempty"` Repeated int `json:"repeated"` AllowScaling bool `json:"allowScaling"` }
type Watermarks ¶
type Watermarks struct {
Image []string `json:"image,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.