Class SoxRestService
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.sox.impl.endpoint.SoxRestService
@Path("/sox")
public class SoxRestService
extends org.opencastproject.rest.AbstractJobProducerEndpoint
A REST endpoint delegating functionality to the
SoxService-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.javax.ws.rs.core.ResponseAnalyze an audio track.org.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryjavax.ws.rs.core.ResponseNormalize an audio track.protected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.voidsetSoxService(org.opencastproject.sox.api.SoxService soxService) Sets the SoX service.Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
docs
The rest documentation -
serverUrl
The base server URL -
soxService
protected org.opencastproject.sox.api.SoxService soxServiceThe composer service -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe service registry
-
-
Constructor Details
-
SoxRestService
public SoxRestService()
-
-
Method Details
-
setServiceRegistry
protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
setSoxService
public void setSoxService(org.opencastproject.sox.api.SoxService soxService) Sets the SoX service.- Parameters:
soxService- the SoX service
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.- Parameters:
cc- OSGi component context
-
analyze
@POST @Path("analyze") @Produces("text/xml") public javax.ws.rs.core.Response analyze(@FormParam("sourceAudioTrack") String sourceAudioTrackAsXml) throws Exception Analyze an audio track.- Parameters:
sourceAudioTrackAsXml- The source audio track- Returns:
- A response containing the job for this audio analyzing job in the response body.
- Throws:
Exception
-
normalize
@POST @Path("normalize") @Produces("text/xml") public javax.ws.rs.core.Response normalize(@FormParam("sourceAudioTrack") String sourceAudioTrackAsXml, @FormParam("targetRmsLevDb") Float targetRmsLevDb) throws Exception Normalize an audio track.- Parameters:
sourceAudioTrackAsXml- The source audio tracktargetRmsLevDb- the target RMS level dB- Returns:
- A response containing the job for this encoding job in the response body.
- Throws:
Exception
-
getService
public org.opencastproject.job.api.JobProducer getService()- Specified by:
getServicein classorg.opencastproject.rest.AbstractJobProducerEndpoint
-
getServiceRegistry
public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.rest.AbstractJobProducerEndpoint
-