use of com.amazonaws.services.elastictranscoder.model.CreateJobResult in project studio by craftercms.
the class ElasticTranscoderImpl method startJob.
@Override
public TranscoderJob startJob(String filename, InputStream content, TranscoderProfile profile) throws AwsException {
try {
AmazonS3 s3Client = getS3Client(profile);
AmazonElasticTranscoder transcoderClient = getTranscoderClient(profile);
Pipeline pipeline = getPipeline(profile.getPipelineId(), transcoderClient);
String baseKey = FilenameUtils.removeExtension(filename) + "/" + UUID.randomUUID().toString();
String inputKey = baseKey + "." + FilenameUtils.getExtension(filename);
uploadInput(inputKey, filename, content, pipeline, s3Client);
CreateJobResult jobResult = createJob(inputKey, baseKey, profile, transcoderClient);
return createResult(baseKey, jobResult, pipeline);
} catch (Exception e) {
throw new AwsException("Error while attempting to start an AWS Elastic Transcoder job for file " + filename, e);
}
}
use of com.amazonaws.services.elastictranscoder.model.CreateJobResult in project studio by craftercms.
the class ElasticTranscoderImpl method createJob.
protected CreateJobResult createJob(String inputKey, String baseKey, TranscoderProfile profile, AmazonElasticTranscoder transcoderClient) {
CreateJobRequest jobRequest = getCreateJobRequest(inputKey, baseKey, profile);
CreateJobResult jobResult = transcoderClient.createJob(jobRequest);
return jobResult;
}
Aggregations