Class SoxServiceImpl

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.sox.impl.SoxServiceImpl
All Implemented Interfaces:
org.opencastproject.job.api.JobProducer, org.opencastproject.sox.api.SoxService, org.osgi.service.cm.ManagedService

public class SoxServiceImpl extends org.opencastproject.job.api.AbstractJobProducer implements org.opencastproject.sox.api.SoxService, org.osgi.service.cm.ManagedService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key to look for in the service configuration file to override the DEFAULT_ANALYZE_JOB_LOAD
    static final String
    The collection name
    static final String
     
    static final float
    The load introduced on the system by creating a analyze job
    static final float
    The load introduced on the system by creating a normalize job
    static final String
    The key to look for in the service configuration file to override the DEFAULT_NORMALIZE_JOB_LOAD
    protected org.opencastproject.security.api.OrganizationDirectoryService
    The organization directory service
    protected org.opencastproject.security.api.SecurityService
    The security service
    static final String
    Default location of the SoX binary (resembling the installer)
    protected org.opencastproject.security.api.UserDirectoryService
    The user directory service

    Fields inherited from class org.opencastproject.job.api.AbstractJobProducer

    ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType

    Fields inherited from interface org.opencastproject.sox.api.SoxService

    JOB_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new composer service instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    OSGi callback on component activation.
    protected org.opencastproject.util.data.Option<org.opencastproject.mediapackage.Track>
    analyze(org.opencastproject.job.api.Job job, org.opencastproject.mediapackage.Track audioTrack)
     
    org.opencastproject.job.api.Job
    analyze(org.opencastproject.mediapackage.Track sourceAudioTrack)
    protected org.opencastproject.security.api.OrganizationDirectoryService
    protected org.opencastproject.security.api.SecurityService
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    protected org.opencastproject.security.api.UserDirectoryService
    org.opencastproject.job.api.Job
    normalize(org.opencastproject.mediapackage.Track sourceAudioTrack, Float targetRmsLevDb)
    protected String
    process(org.opencastproject.job.api.Job job)
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
    Sets a reference to the organization directory service.
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    Callback for setting the security service.
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Sets the service registry
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
    Callback for setting the user directory service.
    protected void
    setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
    Sets the workspace
    void
    updated(Dictionary properties)
     

    Methods inherited from class org.opencastproject.job.api.AbstractJobProducer

    acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs

    Methods inherited from class java.lang.Object

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

    • SOX_BINARY_DEFAULT

      public static final String SOX_BINARY_DEFAULT
      Default location of the SoX binary (resembling the installer)
      See Also:
    • CONFIG_SOX_PATH

      public static final String CONFIG_SOX_PATH
      See Also:
    • DEFAULT_ANALYZE_JOB_LOAD

      public static final float DEFAULT_ANALYZE_JOB_LOAD
      The load introduced on the system by creating a analyze job
      See Also:
    • ANALYZE_JOB_LOAD_KEY

      public static final String ANALYZE_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_ANALYZE_JOB_LOAD
      See Also:
    • DEFAULT_NORMALIZE_JOB_LOAD

      public static final float DEFAULT_NORMALIZE_JOB_LOAD
      The load introduced on the system by creating a normalize job
      See Also:
    • NORMALIZE_JOB_LOAD_KEY

      public static final String NORMALIZE_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_NORMALIZE_JOB_LOAD
      See Also:
    • COLLECTION

      public static final String COLLECTION
      The collection name
      See Also:
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The security service
    • userDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService userDirectoryService
      The user directory service
    • organizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService
      The organization directory service
  • Constructor Details

    • SoxServiceImpl

      public SoxServiceImpl()
      Creates a new composer service instance.
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      OSGi callback on component activation.
      Overrides:
      activate in class org.opencastproject.job.api.AbstractJobProducer
      Parameters:
      cc - the component context
    • analyze

      public org.opencastproject.job.api.Job analyze(org.opencastproject.mediapackage.Track sourceAudioTrack) throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.sox.api.SoxException
      Specified by:
      analyze in interface org.opencastproject.sox.api.SoxService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      org.opencastproject.sox.api.SoxException
      See Also:
      • SoxService.analyze(Track)
    • normalize

      public org.opencastproject.job.api.Job normalize(org.opencastproject.mediapackage.Track sourceAudioTrack, Float targetRmsLevDb) throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.sox.api.SoxException
      Specified by:
      normalize in interface org.opencastproject.sox.api.SoxService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      org.opencastproject.sox.api.SoxException
      See Also:
      • SoxService.normalize(Track, Float)
    • process

      protected String process(org.opencastproject.job.api.Job job) throws Exception
      Specified by:
      process in class org.opencastproject.job.api.AbstractJobProducer
      Throws:
      Exception
      See Also:
      • AbstractJobProducer.process(org.opencastproject.job.api.Job)
    • analyze

      protected org.opencastproject.util.data.Option<org.opencastproject.mediapackage.Track> analyze(org.opencastproject.job.api.Job job, org.opencastproject.mediapackage.Track audioTrack) throws org.opencastproject.sox.api.SoxException
      Throws:
      org.opencastproject.sox.api.SoxException
    • setWorkspace

      protected void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
      Sets the workspace
      Parameters:
      workspace - an instance of the workspace
    • setServiceRegistry

      protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Sets the service registry
      Parameters:
      serviceRegistry - the service registry
    • getServiceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getServiceRegistry()
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Callback for setting the security service.
      Parameters:
      securityService - the securityService to set
    • setUserDirectoryService

      public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
      Callback for setting the user directory service.
      Parameters:
      userDirectoryService - the userDirectoryService to set
    • setOrganizationDirectoryService

      public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
      Sets a reference to the organization directory service.
      Parameters:
      organizationDirectory - the organization directory
    • getSecurityService

      protected org.opencastproject.security.api.SecurityService getSecurityService()
      Specified by:
      getSecurityService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getSecurityService()
    • getUserDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()
      Specified by:
      getUserDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getUserDirectoryService()
    • getOrganizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()
      Specified by:
      getOrganizationDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getOrganizationDirectoryService()
    • updated

      public void updated(Dictionary properties) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException