Interface SmilService

    • Method Detail

      • createNewSmil

        SmilResponse createNewSmil​(org.opencastproject.mediapackage.MediaPackage mediaPackage)
        Create a new Smil and store the MediaPackage Id as meta data.
        Parameters:
        mediaPackage -
        Returns:
        a new Smil
      • addParallel

        SmilResponse addParallel​(Smil smil,
                                 String parentId)
                          throws SmilException
        Add new par element to Smil inside an element with given Id.
        Parameters:
        smil - Smil to edit
        parentId - element id, where to add new par element
        Returns:
        edited Smil and the new SmilMediaContainer
        Throws:
        SmilException - if there is no element with given parentId
      • addSequence

        SmilResponse addSequence​(Smil smil,
                                 String parentId)
                          throws SmilException
        Add new seq element to Smil inside an element with given Id.
        Parameters:
        smil - Smil to edit
        parentId - element id, where to add new seq element
        Returns:
        edited Smil and the new SmilMediaContainer
        Throws:
        SmilException - if there is no element with given parentId
      • addClip

        SmilResponse addClip​(Smil smil,
                             String parentId,
                             org.opencastproject.mediapackage.Track track,
                             long start,
                             long duration)
                      throws SmilException
        Add a SmilMediaElement based on given track and start/duration information.
        Parameters:
        smil - Smil to edit
        parentId - element id, where to add new SmilMediaElement
        track - Track to add as SmilMediaElement
        start - start position in Track in milliseconds
        duration - duration in milliseconds
        Returns:
        edited Smil, the new SmilMediaElement and generated meta data
        Throws:
        SmilException - if there is no element with the given parentId
      • addClip

        SmilResponse addClip​(Smil smil,
                             String parentId,
                             org.opencastproject.mediapackage.Track track,
                             long start,
                             long duration,
                             String paramGroupId)
                      throws SmilException
        Add a SmilMediaElement based on given track and start/duration information.
        Parameters:
        smil - Smil to edit
        parentId - element id, where to add new SmilMediaElement
        track - Track to add as SmilMediaElement
        start - start position in Track in milliseconds
        duration - duration in milliseconds
        paramGroupId - clip should be added as a part of a previously created param group
        Returns:
        edited Smil, the new SmilMediaElement and generated meta data
        Throws:
        SmilException - if there is no element with the given parentId
      • addClips

        SmilResponse addClips​(Smil smil,
                              String parentId,
                              org.opencastproject.mediapackage.Track[] tracks,
                              long start,
                              long duration)
                       throws SmilException
        Add a list of SmilMediaElements based on given tracks and start/duration information.
        Parameters:
        smil - Smil to edit
        parentId - element id, where to add new SmilMediaElements
        tracks - Tracks to add as SmilMediaElements
        start - start position in Tracks in milliseconds
        duration - duration in milliseconds
        Returns:
        edited Smil, the new SmilMediaElements and tracks meta data
        Throws:
        SmilException - if there is no element with the given parentId
      • addMeta

        SmilResponse addMeta​(Smil smil,
                             String name,
                             String content)
        Add a meta element to Smil head.
        Parameters:
        smil - Smil to edit
        name - meta name
        content - meta content
        Returns:
        edited Smil and the new SmilMeta
      • removeSmilElement

        SmilResponse removeSmilElement​(Smil smil,
                                       String elementId)
        Remove element (identified by elementId) from Smil if exists.
        Parameters:
        smil - Smil to edit
        elementId - element Id to remove
        Returns:
        edited Smil and removed SmilMediaElement if Smil contains an element with given Id