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
    Modifier and Type
    Field
    Description
    protected String
    The rest documentation
    protected String
    The base server URL
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry
    protected org.opencastproject.sox.api.SoxService
    The composer service
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Callback from OSGi that is called when this service is activated.
    javax.ws.rs.core.Response
    analyze(String sourceAudioTrackAsXml)
    Analyze an audio track.
    org.opencastproject.job.api.JobProducer
     
    org.opencastproject.serviceregistry.api.ServiceRegistry
     
    javax.ws.rs.core.Response
    normalize(String sourceAudioTrackAsXml, Float targetRmsLevDb)
    Normalize an audio track.
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.
    void
    setSoxService(org.opencastproject.sox.api.SoxService soxService)
    Sets the SoX service.

    Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint

    checkHeartbeat, dispatchJob

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • docs

      protected String docs
      The rest documentation
    • serverUrl

      protected String serverUrl
      The base server URL
    • soxService

      protected org.opencastproject.sox.api.SoxService soxService
      The composer service
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The 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 track
      targetRmsLevDb - 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:
      getService in class org.opencastproject.rest.AbstractJobProducerEndpoint
    • getServiceRegistry

      public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.rest.AbstractJobProducerEndpoint