Package org.opencastproject.sox.impl
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
FieldsModifier and TypeFieldDescriptionstatic final StringThe key to look for in the service configuration file to override theDEFAULT_ANALYZE_JOB_LOADstatic final StringThe collection namestatic final Stringstatic final floatThe load introduced on the system by creating a analyze jobstatic final floatThe load introduced on the system by creating a normalize jobstatic final StringThe key to look for in the service configuration file to override theDEFAULT_NORMALIZE_JOB_LOADprotected org.opencastproject.security.api.OrganizationDirectoryServiceThe organization directory serviceprotected org.opencastproject.security.api.SecurityServiceThe security servicestatic final StringDefault location of the SoX binary (resembling the installer)protected org.opencastproject.security.api.UserDirectoryServiceThe user directory serviceFields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobTypeFields inherited from interface org.opencastproject.sox.api.SoxService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(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.Jobanalyze(org.opencastproject.mediapackage.Track sourceAudioTrack) protected org.opencastproject.security.api.OrganizationDirectoryServiceprotected org.opencastproject.security.api.SecurityServiceprotected org.opencastproject.serviceregistry.api.ServiceRegistryprotected org.opencastproject.security.api.UserDirectoryServiceorg.opencastproject.job.api.Jobprotected Stringprocess(org.opencastproject.job.api.Job job) voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) Callback for setting the security service.protected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Sets the service registryvoidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) Callback for setting the user directory service.protected voidsetWorkspace(org.opencastproject.workspace.api.Workspace workspace) Sets the workspacevoidupdated(Dictionary properties) Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
SOX_BINARY_DEFAULT
Default location of the SoX binary (resembling the installer)- See Also:
-
CONFIG_SOX_PATH
- See Also:
-
DEFAULT_ANALYZE_JOB_LOAD
public static final float DEFAULT_ANALYZE_JOB_LOADThe load introduced on the system by creating a analyze job- See Also:
-
ANALYZE_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_ANALYZE_JOB_LOAD- See Also:
-
DEFAULT_NORMALIZE_JOB_LOAD
public static final float DEFAULT_NORMALIZE_JOB_LOADThe load introduced on the system by creating a normalize job- See Also:
-
NORMALIZE_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_NORMALIZE_JOB_LOAD- See Also:
-
COLLECTION
The collection name- See Also:
-
securityService
protected org.opencastproject.security.api.SecurityService securityServiceThe security service -
userDirectoryService
protected org.opencastproject.security.api.UserDirectoryService userDirectoryServiceThe user directory service -
organizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryServiceThe 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:
activatein classorg.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:
analyzein interfaceorg.opencastproject.sox.api.SoxService- Throws:
org.opencastproject.mediapackage.MediaPackageExceptionorg.opencastproject.sox.api.SoxException- See Also:
-
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:
normalizein interfaceorg.opencastproject.sox.api.SoxService- Throws:
org.opencastproject.mediapackage.MediaPackageExceptionorg.opencastproject.sox.api.SoxException- See Also:
-
process
- Specified by:
processin classorg.opencastproject.job.api.AbstractJobProducer- Throws:
Exception- See Also:
-
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:
getServiceRegistryin classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
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:
getSecurityServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getUserDirectoryService
protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()- Specified by:
getUserDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
getOrganizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()- Specified by:
getOrganizationDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer- See Also:
-
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
org.osgi.service.cm.ConfigurationException
-