Package org.opencastproject.smil.api
Interface SmilService
public interface SmilService
SmilService provides Smil manipulation.-
Method Summary
Modifier and TypeMethodDescriptionaddClip(Smil smil, String parentId, org.opencastproject.mediapackage.Track track, long start, long duration) Add a SmilMediaElement based on given track and start/duration information.addClip(Smil smil, String parentId, org.opencastproject.mediapackage.Track track, long start, long duration, String paramGroupId) Add a SmilMediaElement based on given track and start/duration information.addClips(Smil smil, String parentId, org.opencastproject.mediapackage.Track[] tracks, long start, long duration) Add a list of SmilMediaElements based on given tracks and start/duration information.Add a meta element toSmilhead.addParallel(Smil smil) Add new par element toSmil.addParallel(Smil smil, String parentId) Add new par element toSmilinside an element with given Id.addSequence(Smil smil) Add new seq element toSmil.addSequence(Smil smil, String parentId) Add new seq element toSmilinside an element with given Id.Create a newSmil.createNewSmil(org.opencastproject.mediapackage.MediaPackage mediaPackage) Create a newSmiland store theMediaPackageId as meta data.ReturnsSmilfrom XmlFile.ReturnsSmilfrom XmlString.removeSmilElement(Smil smil, String elementId) Remove element (identified by elementId) fromSmilif exists.
-
Method Details
-
createNewSmil
SmilResponse createNewSmil()Create a newSmil.- Returns:
- a new
Smil
-
createNewSmil
Create a newSmiland store theMediaPackageId as meta data.- Parameters:
mediaPackage-- Returns:
- a new
Smil
-
addParallel
Add new par element toSmil.- Parameters:
smil-Smilto edit- Returns:
- edited
Smiland the new SmilMediaContainer - Throws:
SmilException
-
addParallel
Add new par element toSmilinside an element with given Id.- Parameters:
smil-Smilto editparentId- element id, where to add new par element- Returns:
- edited
Smiland the new SmilMediaContainer - Throws:
SmilException- if there is no element with given parentId
-
addSequence
Add new seq element toSmil.- Parameters:
smil-Smilto edit- Returns:
- edited
Smiland the new SmilMediaContainer - Throws:
SmilException
-
addSequence
Add new seq element toSmilinside an element with given Id.- Parameters:
smil-Smilto editparentId- element id, where to add new seq element- Returns:
- edited
Smiland 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-Smilto editparentId- element id, where to add new SmilMediaElementtrack-Trackto add as SmilMediaElementstart- start position inTrackin millisecondsduration- 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-Smilto editparentId- element id, where to add new SmilMediaElementtrack-Trackto add as SmilMediaElementstart- start position inTrackin millisecondsduration- duration in millisecondsparamGroupId- 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-Smilto editparentId- element id, where to add new SmilMediaElementstracks-Tracks to add as SmilMediaElementsstart- start position inTracks in millisecondsduration- 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
Add a meta element toSmilhead. -
removeSmilElement
Remove element (identified by elementId) fromSmilif exists. -
fromXml
ReturnsSmilfrom XmlString.- Parameters:
smilXml- Smil document Xml asString- Returns:
- parsed
Smil - Throws:
SmilException- if an error occures while parsingSmil
-
fromXml
ReturnsSmilfrom XmlFile.- Parameters:
smilXmlFile- Smil document Xml asFile- Returns:
- parsed
Smil - Throws:
SmilException- if an error occures while parsingSmil
-