Class MediaInspectionServiceImpl

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.inspection.ffmpeg.MediaInspectionServiceImpl
All Implemented Interfaces:
org.opencastproject.inspection.api.MediaInspectionService, org.opencastproject.job.api.JobProducer

public class MediaInspectionServiceImpl extends org.opencastproject.job.api.AbstractJobProducer implements org.opencastproject.inspection.api.MediaInspectionService
Inspects media via ffprobe.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float
    The load introduced on the system by creating an enrich job
    static final float
    The load introduced on the system by creating an inspect job
    static final String
    The key to look for in the service configuration file to override the DEFAULT_ENRICH_JOB_LOAD
    static final String
    The key to look for in the service configuration file to override the DEFAULT_INSPECT_JOB_LOAD

    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.inspection.api.MediaInspectionService

    JOB_TYPE
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
     
    org.opencastproject.job.api.Job
    enrich(org.opencastproject.mediapackage.MediaPackageElement element, boolean override)
    org.opencastproject.job.api.Job
    enrich(org.opencastproject.mediapackage.MediaPackageElement element, boolean override, Map<String,String> options)
    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
    inspect(URI uri)
    org.opencastproject.job.api.Job
    inspect(URI uri, Map<String,String> options)
    void
    modified(org.osgi.service.component.ComponentContext cc)
     
    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 jobManager)
     
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
    Callback for setting the user directory service.
    protected void
    setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
     

    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

    • DEFAULT_INSPECT_JOB_LOAD

      public static final float DEFAULT_INSPECT_JOB_LOAD
      The load introduced on the system by creating an inspect job
      See Also:
    • DEFAULT_ENRICH_JOB_LOAD

      public static final float DEFAULT_ENRICH_JOB_LOAD
      The load introduced on the system by creating an enrich job
      See Also:
    • INSPECT_JOB_LOAD_KEY

      public static final String INSPECT_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_INSPECT_JOB_LOAD
      See Also:
    • ENRICH_JOB_LOAD_KEY

      public static final String ENRICH_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_ENRICH_JOB_LOAD
      See Also:
  • Constructor Details

    • MediaInspectionServiceImpl

      public MediaInspectionServiceImpl()
      Creates a new media inspection service instance.
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Overrides:
      activate in class org.opencastproject.job.api.AbstractJobProducer
    • modified

      public void modified(org.osgi.service.component.ComponentContext cc)
    • 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)
    • inspect

      public org.opencastproject.job.api.Job inspect(URI uri) throws org.opencastproject.inspection.api.MediaInspectionException
      Specified by:
      inspect in interface org.opencastproject.inspection.api.MediaInspectionService
      Throws:
      org.opencastproject.inspection.api.MediaInspectionException
      See Also:
      • MediaInspectionService.inspect(java.net.URI)
    • inspect

      public org.opencastproject.job.api.Job inspect(URI uri, Map<String,String> options) throws org.opencastproject.inspection.api.MediaInspectionException
      Specified by:
      inspect in interface org.opencastproject.inspection.api.MediaInspectionService
      Throws:
      org.opencastproject.inspection.api.MediaInspectionException
      See Also:
      • MediaInspectionService.inspect(java.net.URI, java.util.Map)
    • enrich

      public org.opencastproject.job.api.Job enrich(org.opencastproject.mediapackage.MediaPackageElement element, boolean override) throws org.opencastproject.inspection.api.MediaInspectionException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      enrich in interface org.opencastproject.inspection.api.MediaInspectionService
      Throws:
      org.opencastproject.inspection.api.MediaInspectionException
      org.opencastproject.mediapackage.MediaPackageException
      See Also:
      • MediaInspectionService.enrich(org.opencastproject.mediapackage.MediaPackageElement, boolean)
    • enrich

      public org.opencastproject.job.api.Job enrich(org.opencastproject.mediapackage.MediaPackageElement element, boolean override, Map<String,String> options) throws org.opencastproject.inspection.api.MediaInspectionException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      enrich in interface org.opencastproject.inspection.api.MediaInspectionService
      Throws:
      org.opencastproject.inspection.api.MediaInspectionException
      org.opencastproject.mediapackage.MediaPackageException
      See Also:
      • MediaInspectionService.enrich(org.opencastproject.mediapackage.MediaPackageElement, boolean, java.util.Map)
    • setWorkspace

      protected void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
    • setServiceRegistry

      protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry jobManager)
    • 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()