public class MediaConvertImpl extends Object implements MediaConvert
MediaConvert
.Modifier and Type | Field and Description |
---|---|
protected int |
partSize |
Constructor and Description |
---|
MediaConvertImpl() |
Modifier and Type | Method and Description |
---|---|
protected MediaConvertJob |
createMediaConverJob(com.amazonaws.services.mediaconvert.model.CreateJobResult createJobResult,
String destination,
String key)
Creates an instance of
MediaConvertJob with the result of the transcoding job creation. |
protected String |
getJobDestination(com.amazonaws.services.mediaconvert.model.JobTemplate jobTemplate)
Extracts the output destination from the transcoding job template settings.
|
protected com.amazonaws.services.mediaconvert.AWSMediaConvert |
getMediaConvertClient(MediaConvertProfile profile)
Creates an instance of
AWSMediaConvert to start the transcoding jobs. |
protected com.amazonaws.services.s3.AmazonS3 |
getS3Client(MediaConvertProfile profile)
Creates an instance of
AmazonS3 to upload the files. |
void |
setPartSize(int partSize) |
MediaConvertJob |
startJob(String filename,
InputStream content,
MediaConvertProfile profile)
Uploads a file to AWS S3 and starts a transcoding job in AWS MediaConvert.
|
public void setPartSize(int partSize)
protected com.amazonaws.services.s3.AmazonS3 getS3Client(MediaConvertProfile profile)
AmazonS3
to upload the files.profile
- AWS profileprotected com.amazonaws.services.mediaconvert.AWSMediaConvert getMediaConvertClient(MediaConvertProfile profile)
AWSMediaConvert
to start the transcoding jobs.profile
- AWS profileprotected MediaConvertJob createMediaConverJob(com.amazonaws.services.mediaconvert.model.CreateJobResult createJobResult, String destination, String key)
MediaConvertJob
with the result of the transcoding job creation.createJobResult
- result from the MediaConvert clientdestination
- output destination of the jobkey
- base filename for the outputpublic MediaConvertJob startJob(String filename, InputStream content, MediaConvertProfile profile) throws AwsException
startJob
in interface MediaConvert
filename
- name of the file to uploadcontent
- stream providing the content of the file to uploadprofile
- profile used to create the transcoding jobAwsException
- if the upload or transcoding job creation failsprotected String getJobDestination(com.amazonaws.services.mediaconvert.model.JobTemplate jobTemplate)
jobTemplate
- the job template usedCopyright © 2023 CrafterCMS. All rights reserved.