Class ComposerServiceRemoteImpl

java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.composer.remote.ComposerServiceRemoteImpl
All Implemented Interfaces:
org.opencastproject.composer.api.ComposerService

public class ComposerServiceRemoteImpl extends org.opencastproject.serviceregistry.api.RemoteBase implements org.opencastproject.composer.api.ComposerService
Proxies a set of remote composer services for use as a JVM-local service. Remote services are selected at random.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opencastproject.serviceregistry.api.RemoteBase

    org.opencastproject.serviceregistry.api.RemoteBase.HttpClientClosingInputStream
  • Field Summary

    Fields inherited from class org.opencastproject.serviceregistry.api.RemoteBase

    client, elementsFromHttpResponse, remoteServiceManager, serviceType

    Fields inherited from interface org.opencastproject.composer.api.ComposerService

    AUDIO_ONLY, BOTH, JOB_TYPE, LOWER, UPPER, VIDEO_ONLY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    buildTimeArray(double[] times)
    Builds string containing times in seconds separated by comma.
    org.opencastproject.job.api.Job
    composite(org.opencastproject.composer.layout.Dimension compositeTrackSize, org.opencastproject.util.data.Option<org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Track>> upperTrack, org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Track> lowerTrack, org.opencastproject.util.data.Option<org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Attachment>> watermark, String profileId, String background, String sourceAudioName)
     
    org.opencastproject.job.api.Job
    concat(String profileId, org.opencastproject.composer.layout.Dimension outputDimension, boolean sameCodec, org.opencastproject.mediapackage.Track... tracks)
     
    org.opencastproject.job.api.Job
    concat(String profileId, org.opencastproject.composer.layout.Dimension outputDimension, float outputFrameRate, boolean sameCodec, org.opencastproject.mediapackage.Track... tracks)
     
    org.opencastproject.job.api.Job
    convertImage(org.opencastproject.mediapackage.Attachment image, String... profileIds)
    List<org.opencastproject.mediapackage.Attachment>
    convertImageSync(org.opencastproject.mediapackage.Attachment image, String... profileIds)
    org.opencastproject.job.api.Job
    demux(org.opencastproject.mediapackage.Track sourceTrack, String profileId)
     
    org.opencastproject.job.api.Job
    encode(org.opencastproject.mediapackage.Track sourceTrack, String profileId)
    org.opencastproject.composer.api.EncodingProfile
    getProfile(String profileId)
    org.opencastproject.job.api.Job
    image(org.opencastproject.mediapackage.Track sourceTrack, String profileId, double... times)
    org.opencastproject.job.api.Job
    image(org.opencastproject.mediapackage.Track sourceTrack, String profileId, Map<String,String> properties)
    List<org.opencastproject.mediapackage.Attachment>
    imageSync(org.opencastproject.mediapackage.Track sourceTrack, String profileId, double... times)
     
    org.opencastproject.job.api.Job
    imageToVideo(org.opencastproject.mediapackage.Attachment sourceImageAttachment, String profileId, double time)
     
    org.opencastproject.composer.api.EncodingProfile[]
    org.opencastproject.job.api.Job
    multiEncode(org.opencastproject.mediapackage.Track sourceTrack, List<String> profileIds)
     
    org.opencastproject.job.api.Job
    mux(Map<String,org.opencastproject.mediapackage.Track> sourceTracks, String profileId)
    org.opencastproject.job.api.Job
    mux(org.opencastproject.mediapackage.Track sourceVideoTrack, org.opencastproject.mediapackage.Track sourceAudioTrack, String profileId)
    org.opencastproject.job.api.Job
    parallelEncode(org.opencastproject.mediapackage.Track sourceTrack, String profileId)
    org.opencastproject.job.api.Job
    processSmil(org.opencastproject.smil.entity.api.Smil smil, String trackParamGroupId, String mediaType, List<String> profileIds)
     
    void
    setRemoteServiceManager(org.opencastproject.serviceregistry.api.ServiceRegistry remoteServiceManager)
    Sets the remote service manager.
    void
    setTrustedHttpClient(org.opencastproject.security.api.TrustedHttpClient client)
    Sets the trusted http client
    org.opencastproject.job.api.Job
    trim(org.opencastproject.mediapackage.Track sourceTrack, String profileId, long start, long duration)

    Methods inherited from class org.opencastproject.serviceregistry.api.RemoteBase

    closeConnection, getResponse, getResponse, runRequest

    Methods inherited from class java.lang.Object

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

    • ComposerServiceRemoteImpl

      public ComposerServiceRemoteImpl()
  • Method Details

    • setTrustedHttpClient

      public void setTrustedHttpClient(org.opencastproject.security.api.TrustedHttpClient client)
      Sets the trusted http client
      Overrides:
      setTrustedHttpClient in class org.opencastproject.serviceregistry.api.RemoteBase
      Parameters:
      client -
    • setRemoteServiceManager

      public void setRemoteServiceManager(org.opencastproject.serviceregistry.api.ServiceRegistry remoteServiceManager)
      Sets the remote service manager.
      Overrides:
      setRemoteServiceManager in class org.opencastproject.serviceregistry.api.RemoteBase
      Parameters:
      remoteServiceManager -
    • encode

      public org.opencastproject.job.api.Job encode(org.opencastproject.mediapackage.Track sourceTrack, String profileId) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      encode in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      See Also:
      • ComposerService.encode(org.opencastproject.mediapackage.Track, java.lang.String)
    • parallelEncode

      public org.opencastproject.job.api.Job parallelEncode(org.opencastproject.mediapackage.Track sourceTrack, String profileId) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      parallelEncode in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
    • trim

      public org.opencastproject.job.api.Job trim(org.opencastproject.mediapackage.Track sourceTrack, String profileId, long start, long duration) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      trim in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      See Also:
      • ComposerService.trim(Track, String, long, long)
    • mux

      public org.opencastproject.job.api.Job mux(org.opencastproject.mediapackage.Track sourceVideoTrack, org.opencastproject.mediapackage.Track sourceAudioTrack, String profileId) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      mux in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      See Also:
      • ComposerService.mux(org.opencastproject.mediapackage.Track, org.opencastproject.mediapackage.Track, java.lang.String)
    • mux

      public org.opencastproject.job.api.Job mux(Map<String,org.opencastproject.mediapackage.Track> sourceTracks, String profileId) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      mux in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      See Also:
      • ComposerService.mux(java.util.Map, java.lang.String)
    • getProfile

      public org.opencastproject.composer.api.EncodingProfile getProfile(String profileId)
      Specified by:
      getProfile in interface org.opencastproject.composer.api.ComposerService
      See Also:
      • ComposerService.getProfile(java.lang.String)
    • image

      public org.opencastproject.job.api.Job image(org.opencastproject.mediapackage.Track sourceTrack, String profileId, double... times) throws org.opencastproject.composer.api.EncoderException
      Specified by:
      image in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
    • imageSync

      public List<org.opencastproject.mediapackage.Attachment> imageSync(org.opencastproject.mediapackage.Track sourceTrack, String profileId, double... times) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      imageSync in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • image

      public org.opencastproject.job.api.Job image(org.opencastproject.mediapackage.Track sourceTrack, String profileId, Map<String,String> properties) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      image in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
      See Also:
      • ComposerService.image(Track, String, Map)
    • convertImage

      public org.opencastproject.job.api.Job convertImage(org.opencastproject.mediapackage.Attachment image, String... profileIds) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      convertImage in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
      See Also:
      • ComposerService.convertImage(org.opencastproject.mediapackage.Attachment, java.lang.String...)
    • convertImageSync

      public List<org.opencastproject.mediapackage.Attachment> convertImageSync(org.opencastproject.mediapackage.Attachment image, String... profileIds) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      convertImageSync in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
      See Also:
      • ComposerService.convertImageSync(org.opencastproject.mediapackage.Attachment, java.lang.String...)
    • listProfiles

      public org.opencastproject.composer.api.EncodingProfile[] listProfiles()
      Specified by:
      listProfiles in interface org.opencastproject.composer.api.ComposerService
      See Also:
      • ComposerService.listProfiles()
    • buildTimeArray

      protected String buildTimeArray(double[] times)
      Builds string containing times in seconds separated by comma.
      Parameters:
      times - time array to be converted to string
      Returns:
      string represented specified time array
    • composite

      public org.opencastproject.job.api.Job composite(org.opencastproject.composer.layout.Dimension compositeTrackSize, org.opencastproject.util.data.Option<org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Track>> upperTrack, org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Track> lowerTrack, org.opencastproject.util.data.Option<org.opencastproject.composer.api.LaidOutElement<org.opencastproject.mediapackage.Attachment>> watermark, String profileId, String background, String sourceAudioName) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      composite in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • concat

      public org.opencastproject.job.api.Job concat(String profileId, org.opencastproject.composer.layout.Dimension outputDimension, boolean sameCodec, org.opencastproject.mediapackage.Track... tracks) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      concat in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • concat

      public org.opencastproject.job.api.Job concat(String profileId, org.opencastproject.composer.layout.Dimension outputDimension, float outputFrameRate, boolean sameCodec, org.opencastproject.mediapackage.Track... tracks) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      concat in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • imageToVideo

      public org.opencastproject.job.api.Job imageToVideo(org.opencastproject.mediapackage.Attachment sourceImageAttachment, String profileId, double time) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      imageToVideo in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • demux

      public org.opencastproject.job.api.Job demux(org.opencastproject.mediapackage.Track sourceTrack, String profileId) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      demux in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • processSmil

      public org.opencastproject.job.api.Job processSmil(org.opencastproject.smil.entity.api.Smil smil, String trackParamGroupId, String mediaType, List<String> profileIds) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      processSmil in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException
    • multiEncode

      public org.opencastproject.job.api.Job multiEncode(org.opencastproject.mediapackage.Track sourceTrack, List<String> profileIds) throws org.opencastproject.composer.api.EncoderException, org.opencastproject.mediapackage.MediaPackageException
      Specified by:
      multiEncode in interface org.opencastproject.composer.api.ComposerService
      Throws:
      org.opencastproject.composer.api.EncoderException
      org.opencastproject.mediapackage.MediaPackageException