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(MediaPackage mp, MediaPackageElementFlavor smilFlavor, Workspace workspace) static DocumentLoad the SMIL document identified bympe.
-
Field Details
-
SMIL_NODE_NAME
- See Also:
-
SMIL_NS_URI
- See Also:
-
-
Method Details
-
loadSmilDocument
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(MediaPackage mp, MediaPackageElementFlavor smilFlavor, Workspace workspace) throws IOException, SAXException, NotFoundException - Throws:
IOExceptionSAXExceptionNotFoundException
-