Class AdaptivePlaylist.HLSMediaPackageCheck

java.lang.Object
org.opencastproject.mediapackage.AdaptivePlaylist.HLSMediaPackageCheck
Enclosing interface:
AdaptivePlaylist

public static class AdaptivePlaylist.HLSMediaPackageCheck extends Object
Fix HLS playlists/media already in the workspace as the result of an ingest This builds the hierarchies of a HLS playlist with masters as the roots. This is useful if mixed files are ingested into a mediapackage. HLS files with relative links will fail in an inspection unless the relative paths are fixed. Logical names should be preserved if they exists.
  • Constructor Details

  • Method Details

    • needsRewriting

      public boolean needsRewriting()
    • rewriteHLS

      public List<Track> rewriteHLS(MediaPackage mp, BiFunction<File,Track,Track> replaceTrackFileInWS, Function<Track,Void> removeFromWS) throws MediaPackageException
      Rewrite the playlist file from master on down, this has to be done in multiple steps because the act of putting a file into a collection changes the path and new path is not known in advance. The two functions are passed in to this function to manage the tracks in its storage
      Parameters:
      mp - to be rewrittem
      replaceTrackFileInWS - A function that creates a new track with the file using the metadata in the track, returning a new track in the media package.
      removeFromWS - A function that removes() the track from the media package in the workspace
      Returns:
      old tracks that are removed from the media package
      Throws:
      MediaPackageException - if bad mp