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 Constructor Description SubRipCaptionConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exportCaption(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.Type
getElementType()
String
getExtension()
String[]
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.
-
-
-
Method Detail
-
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:
importCaption
in interfaceorg.opencastproject.caption.api.CaptionConverter
- Throws:
org.opencastproject.caption.api.CaptionConverterException
- See Also:
CaptionConverter.importCaption(java.io.InputStream, java.lang.String)
-
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:
exportCaption
in 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:
getLanguageList
in interfaceorg.opencastproject.caption.api.CaptionConverter
- Throws:
org.opencastproject.caption.api.CaptionConverterException
- See Also:
CaptionConverter.getLanguageList(java.io.InputStream)
-
getExtension
public String getExtension()
- Specified by:
getExtension
in interfaceorg.opencastproject.caption.api.CaptionConverter
- See Also:
CaptionConverter.getExtension()
-
getElementType
public org.opencastproject.mediapackage.MediaPackageElement.Type getElementType()
- Specified by:
getElementType
in interfaceorg.opencastproject.caption.api.CaptionConverter
-
-