org.alembik
Interface TranscodingService


public interface TranscodingService

The principal interface of Alembik transcoding service. Its methods can be accessed through methods of the TranscodingManager wrapper class.

Since:
1.0-beta1

Method Summary
 JobResult getTranscodingInfo(TranscodingRequest request, java.lang.String jobID)
          Returns the result information of a transcoding job with the specified jobId (within the request).
 TranscodingParams getTranscodingProfile(TranscodingJob job)
          Returns the transcoding profile resolved by the server for the given transcoding job.
 boolean isSourceFileReady(TranscodingRequest request, java.lang.String jobID)
          Checks whether the source file of a transcoding job with the specified jobId (within the request) has been loaded into the storage.
 boolean isTranscodedFileReady(TranscodingRequest request, java.lang.String jobID)
          Checks whether the result file of a transcoding job with the specified jobId (within the request) has been transcoded.
 void processAsync(TranscodingRequest request)
          Processes the given transcoding request asynchronously.
 TranscodingResponse processSync(TranscodingRequest request)
          Processes the given transcoding request synchronously.
 

Method Detail

processSync

TranscodingResponse processSync(TranscodingRequest request)
                                throws TranscodingException
Processes the given transcoding request synchronously.

Parameters:
request - transcoding request
Returns:
transcoding response from the server
Throws:
TranscodingException - upon unexpected processing error
See Also:
TranscodingManager.processSync(TranscodingRequest)

processAsync

void processAsync(TranscodingRequest request)
                  throws TranscodingException
Processes the given transcoding request asynchronously.

Parameters:
request - transcoding request
Throws:
TranscodingException - upon unexpected processing error
See Also:
TranscodingManager.processAsync(TranscodingRequest)

isSourceFileReady

boolean isSourceFileReady(TranscodingRequest request,
                          java.lang.String jobID)
Checks whether the source file of a transcoding job with the specified jobId (within the request) has been loaded into the storage.

Parameters:
request - transcoding request
jobID - id of the selected job from the request
Returns:
true if the file is loaded; otherwise false
See Also:
TranscodingManager.isSourceFileReady(TranscodingRequest, String)

isTranscodedFileReady

boolean isTranscodedFileReady(TranscodingRequest request,
                              java.lang.String jobID)
Checks whether the result file of a transcoding job with the specified jobId (within the request) has been transcoded.

Parameters:
request - transcoding request
jobID - id of the selected job from the request
Returns:
true if the file is loaded; otherwise false
See Also:
TranscodingManager.isTranscodedFileReady(TranscodingRequest, String)

getTranscodingInfo

JobResult getTranscodingInfo(TranscodingRequest request,
                             java.lang.String jobID)
Returns the result information of a transcoding job with the specified jobId (within the request). It usually serves for retrieving the transcoded file location, the process status and progress (if still not accomplished) of the jobs processed asynchronously.

Parameters:
request - transcoding request
jobID - id of the selected job from the request
Returns:
job result object
See Also:
TranscodingManager.getTranscodingInfo(TranscodingRequest, String), JobResult.Output.getLocation(), TranscodingUtils.getResultInfo(JobResult, org.alembik.util.TranscodingUtils.FileInfo), TranscodingUtils.getResultState(JobResult)

getTranscodingProfile

TranscodingParams getTranscodingProfile(TranscodingJob job)
Returns the transcoding profile resolved by the server for the given transcoding job. It usually serves for retrieving the transcoding profile details for the job, whose profileID is User-Agent or predefined profile ID.

Parameters:
job - transcoding job
Returns:
transcoding profile
See Also:
TranscodingManager.getTranscodingProfile(TranscodingJob)