com.baidubce.services.media
Class MediaClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.media.MediaClient

public class MediaClient
extends AbstractBceClient

Client for accessing Media Transcoder Services. All service calls made using this client are blocking, and will not return until the service call completes. Created by xuchuan on 2015/4/20.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
MediaClient()
          Constructs a new Media client to invoke service methods on Media Transcoder.
MediaClient(BceClientConfiguration clientConfiguration)
          Constructs a new client using the client configuration to access Media Transcoder services.
 
Method Summary
 CreateJobResponse createJob(CreateJobRequest request)
          Deprecated. As of release 0.8.5, replaced by createTranscodingJob(CreateTranscodingJobRequest)}
 CreateJobResponse createJob(String pipelineName, String sourceKey, String targetKey, String presetName)
          Deprecated. As of release 0.8.5, replaced by createTranscodingJob(String, String, String, String)
 CreatePipelineResponse createPipeline(CreatePipelineRequest request)
          Creates a pipeline which enable you to perform multiple transcodes in parallel.
 CreatePipelineResponse createPipeline(String pipelineName, String sourceBucket, String targetBucket)
          Creates a pipeline which enable you to perform multiple transcodes in parallel.
 CreatePipelineResponse createPipeline(String pipelineName, String sourceBucket, String targetBucket, int capacity)
          Creates a pipeline which enable you to perform multiple transcodes in parallel.
 CreatePipelineResponse createPipeline(String pipelineName, String description, String sourceBucket, String targetBucket, int capacity)
          Creates a pipeline which enable you to perform multiple transcodes in parallel.
 CreatePipelineResponse createPipeline(String pipelineName, String description, String sourceBucket, String targetBucket, int capacity, String notification)
          Creates a pipeline which enable you to perform multiple transcodes in parallel.
 CreatePresetResponse createPreset(CreatePresetRequest request)
          Create a preset which help to convert media files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String container)
          Create a preset which only convert source media file to a different container format without changing the file contents.
 CreatePresetResponse createPreset(String presetName, String container, Audio audio)
          Create a preset which help to convert audio files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String container, Audio audio, Video video)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String container, Clip clip, Audio audio, Encryption encryption)
          Create a preset which help to convert audio files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String container, Clip clip, Audio audio, Video video, Encryption encryption)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String container, Clip clip, Audio audio, Video video, Encryption encryption, String watermarkId)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container)
          Create a preset which only convert source media file to a different container format without changing the file contents.
 CreatePresetResponse createPreset(String presetName, String description, String container, Audio audio)
          Create a preset which help to convert audio files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, Audio audio, Video video)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, boolean transmux, Clip clip, Audio audio, Video video, Encryption encryption)
          Create a preset which help to convert media files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, boolean transmux, Clip clip, Audio audio, Video video, Encryption encryption, String watermarkId)
          Create a preset which help to convert media files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, Clip clip, Audio audio, Encryption encryption)
          Create a preset which help to convert audio files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, Clip clip, Audio audio, Video video, Encryption encryption)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreatePresetResponse createPreset(String presetName, String description, String container, Clip clip, Audio audio, Video video, Encryption encryption, String watermarkId)
          Create a preset which help to convert video files on be played in a wide range of devices.
 CreateThumbnailJobResponse createThumbnailJob(CreateThumbnailJobRequest request)
          Creates a thumbnail job and return job ID.
 CreateThumbnailJobResponse createThumbnailJob(String pipelineName, String sourceKey)
          Creates a thumbnail job and return job ID.
 CreateThumbnailJobResponse createThumbnailJob(String pipelineName, String sourceKey, ThumbnailTarget target, ThumbnailCapture capture)
          Creates a thumbnail job and return job ID.
 CreateThumbnailJobResponse createThumbnailJob(String pipelineName, String sourceKey, ThumbnailTarget target, ThumbnailCapture capture, DelogoArea delogoArea)
          Creates a thumbnail job and return job ID.
 CreateTranscodingJobResponse createTranscodingJob(CreateTranscodingJobRequest request)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset.
 CreateTranscodingJobResponse createTranscodingJob(String pipelineName, List<SourceClip> clips, String targetKey, String presetName)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset.
 CreateTranscodingJobResponse createTranscodingJob(String pipelineName, List<SourceClip> clips, String targetKey, String presetName, String watermarkId)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset and watermarkId associated with the job.
 CreateTranscodingJobResponse createTranscodingJob(String pipelineName, List<SourceClip> clips, String targetKey, String presetName, String watermarkId, DelogoArea delogoArea)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset, watermarkId, and delogoArea.
 CreateTranscodingJobResponse createTranscodingJob(String pipelineName, String sourceKey, String targetKey, String presetName)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset.
 CreateTranscodingJobResponse createTranscodingJob(String pipelineName, String sourceKey, String targetKey, String presetName, String watermarkId, DelogoArea delogoArea)
          Creates a new transcoder job which converts media files in BOS buckets with specified preset, watermarkId, and delogoArea.
 CreateWaterMarkResponse createWaterMark(CreateWaterMarkRequest request)
          Creates a water mark and return water mark ID
 CreateWaterMarkResponse createWaterMark(String bucket, String key, int horizontalOffsetInPixel, int verticalOffsetInPixel)
          Deprecated. 
 CreateWaterMarkResponse createWaterMark(String bucket, String key, String horizontalAlignment, String verticalAlignment)
          Creates a water mark and return water mark ID.
 CreateWaterMarkResponse createWaterMark(String bucket, String key, String horizontalAlignment, String verticalAlignment, int horizontalOffsetInPixel, int verticalOffsetInPixel)
          Creates a water mark and return water mark ID.
 void deletePipeline(DeletePipelineRequest request)
          Deletes a pipeline with the specified pipeline name.
 void deletePipeline(String pipelineName)
          Gets a pipeline with the specified pipeline name.
 void deletePreset(DeletePresetRequest request)
          Deletes a preset with specified name.
 void deletePreset(String presetName)
          Deletes a preset with specified name.
 void deleteWaterMark(DeleteWaterMarkRequest request)
          Delete a water mark.
 void deleteWaterMark(String watermarkId)
          Delete a water mark.
 GetJobResponse getJob(GetJobRequest request)
          Deprecated. As of release 0.8.5, replaced by getTranscodingJob(GetTranscodingJobRequest)
 GetJobResponse getJob(String jobId)
          Deprecated. As of release 0.8.5, replaced by getTranscodingJob(String)
 GetMediaInfoOfFileResponse getMediaInfoOfFile(GetMediaInfoOfFileRequest request)
          Retrieve the media information of an object in Bos bucket.
 GetMediaInfoOfFileResponse getMediaInfoOfFile(String bucket, String key)
          Retrieve the media information of an object in Bos bucket.
 GetPipelineResponse getPipeline(GetPipelineRequest request)
          Gets a pipeline with the specified pipeline name.
 GetPipelineResponse getPipeline(String pipelineName)
          Gets a pipeline with the specified pipeline name.
 GetPresetResponse getPreset(GetPresetRequest request)
          Gets a preset with specified name.
 GetPresetResponse getPreset(String presetName)
          Gets a preset with specified name.
 GetThumbnailJobResponse getThumbnailJob(GetThumbnailJobRequest request)
          Get information of thumbnail job.
 GetThumbnailJobResponse getThumbnailJob(String jobId)
          Get information of thumbnail job.
 GetTranscodingJobResponse getTranscodingJob(GetTranscodingJobRequest request)
          Retrieve the status of a job.
 GetTranscodingJobResponse getTranscodingJob(String jobId)
          Retrieve the status of a job.
 GetWaterMarkResponse getWaterMark(GetWaterMarkRequest request)
          Get a water mark for a given water mark ID.
 GetWaterMarkResponse getWaterMark(String watermarkId)
          Get a water mark for a given water mark ID.
 ListJobsResponse listJobs(ListJobsRequest request)
          Deprecated. As of release 0.8.5, replaced by listTranscodingJobs(ListTranscodingJobsRequest)
 ListJobsResponse listJobs(String pipelineName)
          Deprecated. As of release 0.8.5, replaced by listTranscodingJobs(String)
 ListPipelinesResponse listPipelines()
          List all your pipelines.
 ListPipelinesResponse listPipelines(ListPipelinesRequest request)
          List all your pipelines.
 ListPresetsResponse listPresets()
          List all system and user's preset.
 ListPresetsResponse listPresets(ListPresetsRequest request)
          List all system and user's preset.
 ListThumbnailJobsResponse listThumbnailJobs(ListThumbnailJobsRequest request)
          List thumbnail jobs for a given pipeline.
 ListThumbnailJobsResponse listThumbnailJobs(String pipelineName)
          List thumbnail jobs for a given pipeline.
 ListTranscodingJobsResponse listTranscodingJobs(ListTranscodingJobsRequest request)
          List all transcoder jobs on specified pipeline.
 ListTranscodingJobsResponse listTranscodingJobs(String pipelineName)
          List all transcoder jobs on specified pipeline.
 ListWaterMarkResponse listWaterMark()
          List all water mark.
 ListWaterMarkResponse listWaterMark(ListWaterMarkRequest request)
          List all water mark.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaClient

public MediaClient()
Constructs a new Media client to invoke service methods on Media Transcoder.


MediaClient

public MediaClient(BceClientConfiguration clientConfiguration)
Constructs a new client using the client configuration to access Media Transcoder services.

Parameters:
clientConfiguration - The client configuration options controlling how this client connects to Media services (e.g. proxy settings, retry counts, etc).
Method Detail

createJob

@Deprecated
public CreateJobResponse createJob(String pipelineName,
                                              String sourceKey,
                                              String targetKey,
                                              String presetName)
Deprecated. As of release 0.8.5, replaced by createTranscodingJob(String, String, String, String)

Creates a new transcoder job which converts media files in BOS buckets with specified preset.

Parameters:
pipelineName - The name of pipeline used by this job.
sourceKey - The key of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
Returns:
The newly created job ID.

createJob

@Deprecated
public CreateJobResponse createJob(CreateJobRequest request)
Deprecated. As of release 0.8.5, replaced by createTranscodingJob(CreateTranscodingJobRequest)}

Creates a new transcoder job which converts media files in BOS buckets with specified preset.

Parameters:
request - The request object containing all options for creating a job.
Returns:
The newly created job ID.

listJobs

@Deprecated
public ListJobsResponse listJobs(String pipelineName)
Deprecated. As of release 0.8.5, replaced by listTranscodingJobs(String)

List all transcoder jobs on specified pipeline.

Parameters:
pipelineName - The name of a pipeline.
Returns:
The list of job IDs.

listJobs

@Deprecated
public ListJobsResponse listJobs(ListJobsRequest request)
Deprecated. As of release 0.8.5, replaced by listTranscodingJobs(ListTranscodingJobsRequest)

List all transcoder jobs on specified pipeline.

Parameters:
request - The request object containing all options for list jobs.
Returns:
The list of job IDs.

getJob

@Deprecated
public GetJobResponse getJob(String jobId)
Deprecated. As of release 0.8.5, replaced by getTranscodingJob(String)

Retrieve the status of a job.

Parameters:
jobId - The ID of a job.
Returns:
The status of a job.

getJob

@Deprecated
public GetJobResponse getJob(GetJobRequest request)
Deprecated. As of release 0.8.5, replaced by getTranscodingJob(GetTranscodingJobRequest)

Retrieve the status of a job.

Parameters:
request - The request object containing all options for retrieving job status.
Returns:
The status of a job.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(String pipelineName,
                                                         String sourceKey,
                                                         String targetKey,
                                                         String presetName)
Creates a new transcoder job which converts media files in BOS buckets with specified preset.

Parameters:
pipelineName - The name of pipeline used by this job.
sourceKey - The key of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
Returns:
The newly created job ID.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(String pipelineName,
                                                         String sourceKey,
                                                         String targetKey,
                                                         String presetName,
                                                         String watermarkId,
                                                         DelogoArea delogoArea)
Creates a new transcoder job which converts media files in BOS buckets with specified preset, watermarkId, and delogoArea.

Parameters:
pipelineName - The name of pipeline used by this job.
sourceKey - The key of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
watermarkId - Single watermarkId associated with the job.
delogoArea - The delogo area (x, y, width, height).
Returns:
The newly created job ID.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(String pipelineName,
                                                         List<SourceClip> clips,
                                                         String targetKey,
                                                         String presetName)
Creates a new transcoder job which converts media files in BOS buckets with specified preset.

Parameters:
pipelineName - The name of pipeline used by this job.
clips - The keys of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
Returns:
The newly created job ID.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(String pipelineName,
                                                         List<SourceClip> clips,
                                                         String targetKey,
                                                         String presetName,
                                                         String watermarkId)
Creates a new transcoder job which converts media files in BOS buckets with specified preset and watermarkId associated with the job.

Parameters:
pipelineName - The name of pipeline used by this job.
clips - The keys of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
watermarkId - Single watermarkId associated with the job.
Returns:
The newly created job ID.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(String pipelineName,
                                                         List<SourceClip> clips,
                                                         String targetKey,
                                                         String presetName,
                                                         String watermarkId,
                                                         DelogoArea delogoArea)
Creates a new transcoder job which converts media files in BOS buckets with specified preset, watermarkId, and delogoArea.

Parameters:
pipelineName - The name of pipeline used by this job.
clips - The keys of the source media file in the bucket specified in the pipeline.
targetKey - The key of the target media file in the bucket specified in the pipeline.
presetName - The name of the preset used by this job.
watermarkId - Single watermarkId associated with the job.
delogoArea - The delogo area (x, y, width, height).
Returns:
The newly created job ID.

createTranscodingJob

public CreateTranscodingJobResponse createTranscodingJob(CreateTranscodingJobRequest request)
Creates a new transcoder job which converts media files in BOS buckets with specified preset.

Parameters:
request - The request object containing all options for creating a job.
Returns:
The newly created job ID.

listTranscodingJobs

public ListTranscodingJobsResponse listTranscodingJobs(String pipelineName)
List all transcoder jobs on specified pipeline.

Parameters:
pipelineName - The name of a pipeline.
Returns:
The list of job IDs.

listTranscodingJobs

public ListTranscodingJobsResponse listTranscodingJobs(ListTranscodingJobsRequest request)
List all transcoder jobs on specified pipeline.

Parameters:
request - The request object containing all options for list jobs.
Returns:
The list of job IDs.

getTranscodingJob

public GetTranscodingJobResponse getTranscodingJob(String jobId)
Retrieve the status of a job.

Parameters:
jobId - The ID of a job.
Returns:
The status of a job.

getTranscodingJob

public GetTranscodingJobResponse getTranscodingJob(GetTranscodingJobRequest request)
Retrieve the status of a job.

Parameters:
request - The request object containing all options for retrieving job status.
Returns:
The status of a job.

createPipeline

public CreatePipelineResponse createPipeline(String pipelineName,
                                             String sourceBucket,
                                             String targetBucket,
                                             int capacity)
Creates a pipeline which enable you to perform multiple transcodes in parallel.

Parameters:
pipelineName - The name of the new pipeline.
sourceBucket - The name of source bucket in Bos.
targetBucket - The name of target bucket in Bos.
capacity - The concurrent capability of the new pipeline.

createPipeline

public CreatePipelineResponse createPipeline(String pipelineName,
                                             String sourceBucket,
                                             String targetBucket)
Creates a pipeline which enable you to perform multiple transcodes in parallel.

Parameters:
pipelineName - The name of the new pipeline.
sourceBucket - The name of source bucket in Bos.
targetBucket - The name of target bucket in Bos.

createPipeline

public CreatePipelineResponse createPipeline(String pipelineName,
                                             String description,
                                             String sourceBucket,
                                             String targetBucket,
                                             int capacity)
Creates a pipeline which enable you to perform multiple transcodes in parallel.

Parameters:
pipelineName - The name of new pipeline.
description - The optional description of the new pipeline.
sourceBucket - The name of source bucket in Bos.
targetBucket - The name of target bucket in Bos.
capacity - The concurrent capability of the new pipeline.

createPipeline

public CreatePipelineResponse createPipeline(String pipelineName,
                                             String description,
                                             String sourceBucket,
                                             String targetBucket,
                                             int capacity,
                                             String notification)
Creates a pipeline which enable you to perform multiple transcodes in parallel.

Parameters:
pipelineName - The name of new pipeline.
description - The optional description of the new pipeline.
sourceBucket - The name of source bucket in Bos.
targetBucket - The name of target bucket in Bos.
capacity - The concurrent capability of the new pipeline.
notification - The name of notification

createPipeline

public CreatePipelineResponse createPipeline(CreatePipelineRequest request)
Creates a pipeline which enable you to perform multiple transcodes in parallel.

Parameters:
request - The request object containing all options for creating new pipeline.

listPipelines

public ListPipelinesResponse listPipelines()
List all your pipelines.

Returns:
The list of all your pipelines

listPipelines

public ListPipelinesResponse listPipelines(ListPipelinesRequest request)
List all your pipelines.

Parameters:
request - The request object containing all options for listing all pipelines.
Returns:
The list of all your pipelines

getPipeline

public GetPipelineResponse getPipeline(String pipelineName)
Gets a pipeline with the specified pipeline name.

Parameters:
pipelineName - The name of your pipeline.
Returns:
The information of your pipeline.

getPipeline

public GetPipelineResponse getPipeline(GetPipelineRequest request)
Gets a pipeline with the specified pipeline name.

Parameters:
request - The request object containing all options for getting a pipelines.
Returns:
The information of your pipeline.

deletePipeline

public void deletePipeline(String pipelineName)
Gets a pipeline with the specified pipeline name.

Parameters:
pipelineName - The name of your pipeline.

deletePipeline

public void deletePipeline(DeletePipelineRequest request)
Deletes a pipeline with the specified pipeline name.

Parameters:
request - The request object containing all options for deleting a pipelines.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container,
                                         Audio audio)
Create a preset which help to convert audio files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
audio - Specify the audio format of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         Audio audio)
Create a preset which help to convert audio files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
audio - Specify the audio format of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Encryption encryption)
Create a preset which help to convert audio files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
encryption - Specify the encryption property of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Encryption encryption)
Create a preset which help to convert audio files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
encryption - Specify the encryption property of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container,
                                         Audio audio,
                                         Video video)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
audio - Specify the audio format of target file.
video - Specify the video format of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         Audio audio,
                                         Video video)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
audio - Specify the audio format of target file.
video - Specify the video format of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption,
                                         String watermarkId)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.
watermarkId - Specify the watermarkId.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption,
                                         String watermarkId)
Create a preset which help to convert video files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.
watermarkId - Specify the watermarkId.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String container)
Create a preset which only convert source media file to a different container format without changing the file contents.

Parameters:
presetName - The name of the new preset.
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container)
Create a preset which only convert source media file to a different container format without changing the file contents.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         boolean transmux,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption)
Create a preset which help to convert media files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
transmux - If true, means only convert source media file to a different container format without changing the file contents.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.

createPreset

public CreatePresetResponse createPreset(String presetName,
                                         String description,
                                         String container,
                                         boolean transmux,
                                         Clip clip,
                                         Audio audio,
                                         Video video,
                                         Encryption encryption,
                                         String watermarkId)
Create a preset which help to convert media files on be played in a wide range of devices.

Parameters:
presetName - The name of the new preset.
description - The description of the new preset
container - The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a.
transmux - If true, means only convert source media file to a different container format without changing the file contents.
clip - The clip property of the preset.
audio - Specify the audio format of target file.
video - Specify the video format of target file.
encryption - Specify the encryption property of target file.
watermarkId - Specify the watermarkId.

createPreset

public CreatePresetResponse createPreset(CreatePresetRequest request)
Create a preset which help to convert media files on be played in a wide range of devices.

Parameters:
request - The request object containing all options for deleting presets.

listPresets

public ListPresetsResponse listPresets()
List all system and user's preset.

Returns:
The list of all available preset.

listPresets

public ListPresetsResponse listPresets(ListPresetsRequest request)
List all system and user's preset.

Parameters:
request - The request object containing all options for listing presets.
Returns:
The list of all available preset.

getPreset

public GetPresetResponse getPreset(String presetName)
Gets a preset with specified name.

Parameters:
presetName - The name of a preset.
Returns:
The information of the preset.

getPreset

public GetPresetResponse getPreset(GetPresetRequest request)
Gets a preset with specified name.

Parameters:
request - The request object containing all options for getting a preset.
Returns:
The information of the preset.

deletePreset

public void deletePreset(String presetName)
Deletes a preset with specified name.

Parameters:
presetName - The name of a preset.

deletePreset

public void deletePreset(DeletePresetRequest request)
Deletes a preset with specified name.

Parameters:
request - The request object containing all options for deleting a preset.

getMediaInfoOfFile

public GetMediaInfoOfFileResponse getMediaInfoOfFile(String bucket,
                                                     String key)
Retrieve the media information of an object in Bos bucket.

Parameters:
bucket - The bucket name of Bos object which you want to read.
key - The key name of Bos object which your want to read.
Returns:
The media information of an object in Bos bucket.

getMediaInfoOfFile

public GetMediaInfoOfFileResponse getMediaInfoOfFile(GetMediaInfoOfFileRequest request)
Retrieve the media information of an object in Bos bucket.

Parameters:
request - The request object containing all options for retrieving media information.
Returns:
The media information of an object in Bos bucket.

createWaterMark

@Deprecated
public CreateWaterMarkResponse createWaterMark(String bucket,
                                                          String key,
                                                          int horizontalOffsetInPixel,
                                                          int verticalOffsetInPixel)
Deprecated. 

Creates a water mark and return water mark ID.

Parameters:
bucket - The bucket name of Bos object which you want to read.
key - The key name of Bos object which your want to read.
horizontalOffsetInPixel - The horizontal offset in pixels.
verticalOffsetInPixel - The vertical offset in pixels.
Returns:
watermarkId the unique ID of the new water mark.

createWaterMark

public CreateWaterMarkResponse createWaterMark(String bucket,
                                               String key,
                                               String horizontalAlignment,
                                               String verticalAlignment)
Creates a water mark and return water mark ID.

Parameters:
bucket - The bucket name of Bos object which you want to read.
key - The key name of Bos object which your want to read.
horizontalAlignment - The horizontal alignment, includes left, center, right.
verticalAlignment - The vertical alignment, includes top, center, bottom.
Returns:
watermarkId the unique ID of the new water mark.

createWaterMark

public CreateWaterMarkResponse createWaterMark(String bucket,
                                               String key,
                                               String horizontalAlignment,
                                               String verticalAlignment,
                                               int horizontalOffsetInPixel,
                                               int verticalOffsetInPixel)
Creates a water mark and return water mark ID.

Parameters:
bucket - The bucket name of Bos object which you want to read.
key - The key name of Bos object which your want to read.
horizontalAlignment - The horizontal alignment, includes left, center, right.
verticalAlignment - The vertical alignment, includes top, center, bottom.
horizontalOffsetInPixel - The horizontal offset in pixels.
verticalOffsetInPixel - The vertical offset in pixels.
Returns:
watermarkId the unique ID of the new water mark.

createWaterMark

public CreateWaterMarkResponse createWaterMark(CreateWaterMarkRequest request)
Creates a water mark and return water mark ID

Parameters:
request - The request object containing all options for creating new water mark.
Returns:
watermarkId the unique ID of the new water mark.

getWaterMark

public GetWaterMarkResponse getWaterMark(String watermarkId)
Get a water mark for a given water mark ID.

Parameters:
watermarkId - The ID of water mark.
Returns:
The information of the water mark.

getWaterMark

public GetWaterMarkResponse getWaterMark(GetWaterMarkRequest request)
Get a water mark for a given water mark ID.

Parameters:
request - The request object containing all options for getting water mark.
Returns:
The information of the water mark.

listWaterMark

public ListWaterMarkResponse listWaterMark()
List all water mark.

Returns:
The list of all user's water mark.

listWaterMark

public ListWaterMarkResponse listWaterMark(ListWaterMarkRequest request)
List all water mark.

Returns:
The list of all user's water mark.

deleteWaterMark

public void deleteWaterMark(String watermarkId)
Delete a water mark.

Parameters:
watermarkId - The ID of water mark.

deleteWaterMark

public void deleteWaterMark(DeleteWaterMarkRequest request)
Delete a water mark.

Parameters:
request - The request object containing all options for deleting water mark.

createThumbnailJob

public CreateThumbnailJobResponse createThumbnailJob(String pipelineName,
                                                     String sourceKey,
                                                     ThumbnailTarget target,
                                                     ThumbnailCapture capture)
Creates a thumbnail job and return job ID.

Parameters:
pipelineName - The name of a pipeline.
sourceKey - The key of source object.
target - The property container of target object.
capture - The property container of thumbnail generating policies.
Returns:
the unique ID of the new thumbnail job.

createThumbnailJob

public CreateThumbnailJobResponse createThumbnailJob(String pipelineName,
                                                     String sourceKey,
                                                     ThumbnailTarget target,
                                                     ThumbnailCapture capture,
                                                     DelogoArea delogoArea)
Creates a thumbnail job and return job ID.

Parameters:
pipelineName - The name of a pipeline.
sourceKey - The key of source object.
target - The property container of target object.
capture - The property container of thumbnail generating policies.
delogoArea - The property container of delogo Area.
Returns:
the unique ID of the new thumbnail job.

createThumbnailJob

public CreateThumbnailJobResponse createThumbnailJob(String pipelineName,
                                                     String sourceKey)
Creates a thumbnail job and return job ID.

Parameters:
pipelineName - The name of a pipeline.
sourceKey - The key of source object.
Returns:
the unique ID of the new thumbnail job.

createThumbnailJob

public CreateThumbnailJobResponse createThumbnailJob(CreateThumbnailJobRequest request)
Creates a thumbnail job and return job ID.

Parameters:
request - The request object containing all options for creating new water mark.
Returns:
the unique ID of the new thumbnail job.

getThumbnailJob

public GetThumbnailJobResponse getThumbnailJob(String jobId)
Get information of thumbnail job.

Parameters:
jobId - The unique ID of thumbnail job.
Returns:
The information of the thumbnail job.

getThumbnailJob

public GetThumbnailJobResponse getThumbnailJob(GetThumbnailJobRequest request)
Get information of thumbnail job.

Parameters:
request - The request object containing all options for creating new water mark.
Returns:
The information of the thumbnail job.

listThumbnailJobs

public ListThumbnailJobsResponse listThumbnailJobs(String pipelineName)
List thumbnail jobs for a given pipeline.

Parameters:
pipelineName - The name of a pipeline.
Returns:
List of thumbnail jobs.

listThumbnailJobs

public ListThumbnailJobsResponse listThumbnailJobs(ListThumbnailJobsRequest request)
List thumbnail jobs for a given pipeline.

Parameters:
request - The request object containing all options for creating new water mark.
Returns:
List of thumbnail jobs.


Copyright © 2018. All rights reserved.