media

package
v0.9.166 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_SERVICE_DOMAIN = "media.bj.baidubce.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

mcp(media) client extends BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

NewClient make MCP(media) service client with defualt configuration endPoint value can chose bj and sz or gz defualt bj

func (*Client) CreateJob

func (cli *Client) CreateJob(pipelineName, sourceKey, targetKey, presetName string) (*api.CreateJobResponse, error)

create transcoding job with pipelineName, sourceKey, targetKey, presetName

func (*Client) CreateJobCustomize

func (cli *Client) CreateJobCustomize(args *api.CreateJobArgs) (*api.CreateJobResponse, error)

create trandcoding job with customize params

func (*Client) CreateNotification

func (cli *Client) CreateNotification(name, endpoint string) error

create notification with name and endpoint

func (*Client) CreatePipeline

func (cli *Client) CreatePipeline(pipelineName, sourceBucket, targetBucket string, capacity int) error

create a simple pipeline with pipelieName,soureBucket,targetBucket,capacity

func (*Client) CreatePreset

func (cli *Client) CreatePreset(presetName, description, container string) error

create preset at the same time perform container format conversion

func (*Client) CreatePrestCustomize

func (cli *Client) CreatePrestCustomize(preset *api.Preset) error

create preset with user-defined configuration

func (*Client) CreateThumbnailJob

func (cli *Client) CreateThumbnailJob(pipelineName, sourceKey string, ops ...Option) (*api.CreateJobResponse, error)

create thumbnail job. you can create a thumbnail job with pipelineName and sourceKey and ThumbnailCapture and ThumbnailTarget or other args

func (*Client) CreateWaterMark

func (cli *Client) CreateWaterMark(watermarks *api.CreateWaterMarkArgs) (*api.CreateWaterMarkResponse, error)

create watermark job

func (*Client) DeleteNotification

func (cli *Client) DeleteNotification(name string) error

delete notification by name

func (*Client) DeletePipeline

func (cli *Client) DeletePipeline(pipelineName string) error

delete pipeline by pipelineName

func (*Client) DeleteWaterMark

func (cli *Client) DeleteWaterMark(watermarkId string) error

delete watermark by watermarkId

func (*Client) GetMediaInfoOfFile

func (cli *Client) GetMediaInfoOfFile(bucket, key string) (*api.GetMediaInfoOfFileResponse, error)

get media information with bucket and key

func (*Client) GetNotification

func (cli *Client) GetNotification(name string) (*api.CreateNotificationArgs, error)

get notification by notification`name

func (*Client) GetPipeline

func (cli *Client) GetPipeline(pipelineName string) (*api.PipelineStatus, error)

query pipeline by piplineName

func (*Client) GetPipelineUpdate

func (cli *Client) GetPipelineUpdate(pipelineName string) (*api.UpdatePipelineArgs, error)

func (*Client) GetPreset

func (cli *Client) GetPreset(presetName string) (*api.Preset, error)

get preset by presetName

func (*Client) GetThumbanilJob

func (cli *Client) GetThumbanilJob(jobId string) (*api.GetThumbnailJobResponse, error)

query thumbanil job by jobId

func (*Client) GetTranscodingJob

func (cli *Client) GetTranscodingJob(jobId string) (*api.GetTranscodingJobResponse, error)

get transcoding job by jobId

func (*Client) GetWaterMark

func (cli *Client) GetWaterMark(watermarkId string) (*api.GetWaterMarkResponse, error)

get watermark by watermarkId

func (*Client) ListNotification

func (cli *Client) ListNotification() (*api.ListNotificationsResponse, error)

list all of user`s notification

func (*Client) ListPipelines

func (cli *Client) ListPipelines() (*api.ListPipelinesResponse, error)

list all pipelines for user

func (*Client) ListPresets

func (cli *Client) ListPresets() (*api.ListPresetsResponse, error)

list all presets

func (*Client) ListThumbnailJobs

func (cli *Client) ListThumbnailJobs(pipelineName string) (*api.ListThumbnailJobsResponse, error)

get thumbanil job by pipelineName

func (*Client) ListTranscodingJobs

func (cli *Client) ListTranscodingJobs(pipelineName string) (*api.ListTranscodingJobsResponse, error)

list all jobs with piplineName

func (*Client) ListWaterMark

func (cli *Client) ListWaterMark() (*api.ListWaterMarkResponse, error)

list user`s watermark by watermarkId

func (*Client) UpdatePipeline

func (cli *Client) UpdatePipeline(pipelineName string, updatePipelineArgs *api.UpdatePipelineArgs) error

update pipeline with UpdatePipelineArgs

func (*Client) UpdatePreset

func (cli *Client) UpdatePreset(preset *api.Preset) error

update preset

type Option

type Option func(thumbnailOptional *api.ThumbnailOptional)

this option implements create thumbnail job function overloading

func CaptureOp

func CaptureOp(capture *api.ThumbnailCapture) Option

func CropOp

func CropOp(crop *api.Area) Option

func DelogoAreaOp

func DelogoAreaOp(delogoArea *api.Area) Option

func PresetNameOp

func PresetNameOp(presetName string) Option

func SourceOp

func SourceOp(source *api.ThumbnailSource) Option

func TargetOp

func TargetOp(target *api.ThumbnailTarget) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL