Interface CaptionService


public interface CaptionService
Provides captioning support. This service makes use of CaptionConverter instances that need to be registered in the OSGi registry.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opencastproject.job.api.Job
    convert(org.opencastproject.mediapackage.MediaPackageElement input, String inputFormat, String outputFormat)
    Converts captions from one format to another.
    org.opencastproject.job.api.Job
    convert(org.opencastproject.mediapackage.MediaPackageElement input, String inputFormat, String outputFormat, String language)
    Converts captions from one format to another.
    getLanguageList(org.opencastproject.mediapackage.MediaPackageElement input, String format)
    Returns list of languages available in captions (if such information is stored).
  • Field Details

  • Method Details

    • convert

      org.opencastproject.job.api.Job convert(org.opencastproject.mediapackage.MediaPackageElement input, String inputFormat, String outputFormat) throws UnsupportedCaptionFormatException, CaptionConverterException, org.opencastproject.mediapackage.MediaPackageException
      Converts captions from one format to another. Language parameter is used for those formats that store information about language.
      Parameters:
      input - MediaPackageElement containing captions
      inputFormat - format of imported captions
      outputFormat - format of exported captions
      Throws:
      UnsupportedCaptionFormatException - if there is no matching engine registered for given input or output
      CaptionConverterException - if exception occurs while converting
      org.opencastproject.mediapackage.MediaPackageException - if the catalog is invalid
    • convert

      org.opencastproject.job.api.Job convert(org.opencastproject.mediapackage.MediaPackageElement input, String inputFormat, String outputFormat, String language) throws UnsupportedCaptionFormatException, CaptionConverterException, org.opencastproject.mediapackage.MediaPackageException
      Converts captions from one format to another. Language parameter is used for those formats that store information about language.
      Parameters:
      input - MediaPackageElement containing captions
      inputFormat - format of imported captions
      outputFormat - format of exported captions
      language - language of captions
      Throws:
      UnsupportedCaptionFormatException - if there is no matching engine registered for given input or output
      CaptionConverterException - if exception occurs while converting
      org.opencastproject.mediapackage.MediaPackageException - if the catalog is invalid
    • getLanguageList

      String[] getLanguageList(org.opencastproject.mediapackage.MediaPackageElement input, String format) throws UnsupportedCaptionFormatException, CaptionConverterException
      Returns list of languages available in captions (if such information is stored).
      Parameters:
      input - Catalog containing captions
      format - captions' format
      Returns:
      Array of languages available in captions
      Throws:
      UnsupportedCaptionFormatException - if there is no matching engine registered for given input or output
      CaptionConverterException - if parser encounters exception