Class SmilUtil
java.lang.Object
org.opencastproject.smil.api.util.SmilUtil
General purpose utility functions for dealing with SMIL.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentaddTrack(Document smilDocument, SmilUtil.TrackType trackType, boolean hasVideo, long startTime, long duration, URI uri, String trackId) Adds a track to the SMIL document.static DocumentCreates a skeleton SMIL documentstatic org.w3c.dom.smil.SMILDocumentgetSmilDocumentFromMediaPackage(org.opencastproject.mediapackage.MediaPackage mp, org.opencastproject.mediapackage.MediaPackageElementFlavor smilFlavor, org.opencastproject.workspace.api.Workspace workspace) static DocumentloadSmilDocument(InputStream in, org.opencastproject.mediapackage.MediaPackageElement mpe) Load the SMIL document identified bympe.
-
Field Details
-
SMIL_NODE_NAME
- See Also:
-
SMIL_NS_URI
- See Also:
-
-
Method Details
-
loadSmilDocument
public static Document loadSmilDocument(InputStream in, org.opencastproject.mediapackage.MediaPackageElement mpe) Load the SMIL document identified bympe. Throws an exception if it does not exist or cannot be loaded by any reason.- Returns:
- the 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 documenttrackType- the track typehasVideo- whether the track has a video streamstartTime- the start timeduration- the durationuri- the track URItrackId- 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:
IOExceptionSAXExceptionorg.opencastproject.util.NotFoundException
-