Package org.opencastproject.smil.api
Interface SmilService
-
public interface SmilServiceSmilServiceprovidesSmilmanipulation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SmilResponseaddClip(Smil smil, String parentId, org.opencastproject.mediapackage.Track track, long start, long duration)Add a SmilMediaElement based on given track and start/duration information.SmilResponseaddClip(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.SmilResponseaddClips(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.SmilResponseaddMeta(Smil smil, String name, String content)Add a meta element toSmilhead.SmilResponseaddParallel(Smil smil)Add new par element toSmil.SmilResponseaddParallel(Smil smil, String parentId)Add new par element toSmilinside an element with given Id.SmilResponseaddSequence(Smil smil)Add new seq element toSmil.SmilResponseaddSequence(Smil smil, String parentId)Add new seq element toSmilinside an element with given Id.SmilResponsecreateNewSmil()Create a newSmil.SmilResponsecreateNewSmil(org.opencastproject.mediapackage.MediaPackage mediaPackage)Create a newSmiland store theMediaPackageId as meta data.SmilResponsefromXml(File smilXmlFile)ReturnsSmilfrom XmlFile.SmilResponsefromXml(String smilXml)ReturnsSmilfrom XmlString.SmilResponseremoveSmilElement(Smil smil, String elementId)Remove element (identified by elementId) fromSmilif exists.
-
-
-
Method Detail
-
createNewSmil
SmilResponse createNewSmil()
Create a newSmil.- Returns:
- a new
Smil
-
createNewSmil
SmilResponse createNewSmil(org.opencastproject.mediapackage.MediaPackage mediaPackage)
Create a newSmiland store theMediaPackageId as meta data.- Parameters:
mediaPackage-- Returns:
- a new
Smil
-
addParallel
SmilResponse addParallel(Smil smil) throws SmilException
Add new par element toSmil.- Parameters:
smil-Smilto edit- Returns:
- edited
Smiland the new SmilMediaContainer - Throws:
SmilException
-
addParallel
SmilResponse addParallel(Smil smil, String parentId) throws SmilException
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
SmilResponse addSequence(Smil smil) throws SmilException
Add new seq element toSmil.- Parameters:
smil-Smilto edit- Returns:
- edited
Smiland the new SmilMediaContainer - Throws:
SmilException
-
addSequence
SmilResponse addSequence(Smil smil, String parentId) throws SmilException
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
SmilResponse addMeta(Smil smil, String name, String content)
Add a meta element toSmilhead.
-
removeSmilElement
SmilResponse removeSmilElement(Smil smil, String elementId)
Remove element (identified by elementId) fromSmilif exists.
-
fromXml
SmilResponse fromXml(String smilXml) throws SmilException
ReturnsSmilfrom XmlString.- Parameters:
smilXml- Smil document Xml asString- Returns:
- parsed
Smil - Throws:
SmilException- if an error occures while parsingSmil
-
fromXml
SmilResponse fromXml(File smilXmlFile) throws SmilException
ReturnsSmilfrom XmlFile.- Parameters:
smilXmlFile- Smil document Xml asFile- Returns:
- parsed
Smil - Throws:
SmilException- if an error occures while parsingSmil
-
-