Class SoxRestService
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.sox.impl.endpoint.SoxRestService
A REST endpoint delegating functionality to the
SoxService-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe rest documentationprotected StringThe base server URLprotected ServiceRegistryThe service registryprotected SoxServiceThe composer service -
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.Returns the job producer that is backing this REST endpoint.Return the service registry.javax.ws.rs.core.ResponseNormalize an audio track.protected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.voidsetSoxService(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
The composer service -
serviceRegistry
The service registry
-
-
Constructor Details
-
SoxRestService
public SoxRestService()
-
-
Method Details
-
setServiceRegistry
Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
setSoxService
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
Description copied from class:AbstractJobProducerEndpointReturns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
-
getServiceRegistry
Description copied from class:AbstractJobProducerEndpointReturn the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint
-