Class SubRipCaptionConverter
java.lang.Object
org.opencastproject.caption.converters.SubRipCaptionConverter
- All Implemented Interfaces:
org.opencastproject.caption.api.CaptionConverter
public class SubRipCaptionConverter
extends Object
implements org.opencastproject.caption.api.CaptionConverter
Converter engine for SubRip srt caption format. It does not support advanced SubRip format (SubRip format with
annotations). Advanced format will be parsed but all annotations will be stripped off.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexportCaption(OutputStream outputStream, List<org.opencastproject.caption.api.Caption> captions, String language) Since srt does not store information about language, language parameter is ignored.org.opencastproject.mediapackage.MediaPackageElement.TypeString[]getLanguageList(InputStream input) Returns empty list since srt format does not store any information about language.List<org.opencastproject.caption.api.Caption> importCaption(InputStream in, String language) Since srt does not store information about language, language parameter is ignored.
-
Constructor Details
-
SubRipCaptionConverter
public SubRipCaptionConverter()
-
-
Method Details
-
importCaption
public List<org.opencastproject.caption.api.Caption> importCaption(InputStream in, String language) throws org.opencastproject.caption.api.CaptionConverterException Since srt does not store information about language, language parameter is ignored.- Specified by:
importCaptionin interfaceorg.opencastproject.caption.api.CaptionConverter- Throws:
org.opencastproject.caption.api.CaptionConverterException- See Also:
-
exportCaption
public void exportCaption(OutputStream outputStream, List<org.opencastproject.caption.api.Caption> captions, String language) throws IOException Since srt does not store information about language, language parameter is ignored.- Specified by:
exportCaptionin interfaceorg.opencastproject.caption.api.CaptionConverter- Throws:
IOException
-
getLanguageList
public String[] getLanguageList(InputStream input) throws org.opencastproject.caption.api.CaptionConverterException Returns empty list since srt format does not store any information about language.- Specified by:
getLanguageListin interfaceorg.opencastproject.caption.api.CaptionConverter- Throws:
org.opencastproject.caption.api.CaptionConverterException- See Also:
-
getExtension
- Specified by:
getExtensionin interfaceorg.opencastproject.caption.api.CaptionConverter- See Also:
-
getElementType
public org.opencastproject.mediapackage.MediaPackageElement.Type getElementType()- Specified by:
getElementTypein interfaceorg.opencastproject.caption.api.CaptionConverter
-