Class SmilUtil

java.lang.Object
org.opencastproject.smil.api.util.SmilUtil

public final class SmilUtil extends Object
General purpose utility functions for dealing with SMIL.
  • Field Details

  • Method Details

    • loadSmilDocument

      public static Document loadSmilDocument(InputStream in, org.opencastproject.mediapackage.MediaPackageElement mpe)
      Load the SMIL document identified by mpe. Throws an exception if it does not exist or cannot be loaded by any reason.
      Returns:
      the document
    • createSmil

      public static Document createSmil()
      Creates a skeleton SMIL document
      Returns:
      the SMIL document
    • addTrack

      public static Document addTrack(Document smilDocument, SmilUtil.TrackType trackType, boolean hasVideo, long startTime, long duration, URI uri, String trackId)
      Adds a track to the SMIL document.
      Parameters:
      smilDocument - the SMIL document
      trackType - the track type
      hasVideo - whether the track has a video stream
      startTime - the start time
      duration - the duration
      uri - the track URI
      trackId - the Id of the track
      Returns:
      the augmented SMIL document
    • getSmilDocumentFromMediaPackage

      public static org.w3c.dom.smil.SMILDocument getSmilDocumentFromMediaPackage(org.opencastproject.mediapackage.MediaPackage mp, org.opencastproject.mediapackage.MediaPackageElementFlavor smilFlavor, org.opencastproject.workspace.api.Workspace workspace) throws IOException, SAXException, org.opencastproject.util.NotFoundException
      Throws:
      IOException
      SAXException
      org.opencastproject.util.NotFoundException