Class PlayUtils


  • public class PlayUtils
    extends java.lang.Object
    • Field Detail

      • playableFileExtensions

        public static final java.lang.String playableFileExtensions
        Access to this static is deprecated - use get/setPlayableFileExtensions. For legacy EMP we need to keep it public for the moment...
        See Also:
        Constant Field Values
      • actualPlayableFileExtensions

        private static volatile java.lang.String actualPlayableFileExtensions
      • hasQuickTime

        private static java.lang.Boolean hasQuickTime
      • tls_non_block_indicator

        private static java.lang.ThreadLocal<int[]> tls_non_block_indicator
      • dm_uid

        private static java.util.concurrent.atomic.AtomicInteger dm_uid
      • ext_play_cache

        private static final java.util.Map<java.lang.String,​java.lang.Object[]> ext_play_cache
    • Constructor Detail

      • PlayUtils

        public PlayUtils()
    • Method Detail

      • prepareForPlay

        public static boolean prepareForPlay​(DownloadManager dm)
      • canUseEMP

        public static boolean canUseEMP​(TOTorrent torrent,
                                        int file_index)
      • canUseEMP

        public static boolean canUseEMP​(TOTorrent torrent,
                                        int file_index,
                                        boolean complete_only)
      • canPlay

        private static boolean canPlay​(DownloadManager dm,
                                       int file_index)
      • canPlay

        private static boolean canPlay​(TOTorrent torrent,
                                       int file_index)
      • canPlayDS

        public static boolean canPlayDS​(java.lang.Object ds,
                                        int file_index,
                                        boolean block_for_accuracy)
      • isStreamPermitted

        public static boolean isStreamPermitted()
      • canStream

        private static boolean canStream​(DownloadManager dm,
                                         int file_index)
      • canStreamDS

        public static boolean canStreamDS​(java.lang.Object ds,
                                          int file_index,
                                          boolean block_for_accuracy)
      • getMediaServerContentURL

        public static java.net.URL getMediaServerContentURL​(DiskManagerFileInfo file)
      • isExternallyPlayable

        public static boolean isExternallyPlayable​(Download d,
                                                   int file_index,
                                                   boolean complete_only)
      • isExternallyPlayableSupport

        private static boolean isExternallyPlayableSupport​(Download d,
                                                           int file_index,
                                                           boolean complete_only)
      • getExternallyPlayableFileIndexes

        public static int[] getExternallyPlayableFileIndexes​(Download d,
                                                             boolean complete_only)
      • isExternallyPlayable

        private static boolean isExternallyPlayable​(DiskManagerFileInfo file)
      • isExternallyPlayable

        public static boolean isExternallyPlayable​(TOTorrent torrent,
                                                   int file_index,
                                                   boolean complete_only)
      • canPlayViaExternalEMP

        private static boolean canPlayViaExternalEMP​(TOTorrent torrent,
                                                     int file_index,
                                                     boolean complete_only)
      • getPlayableFileExtensions

        public static java.lang.String getPlayableFileExtensions()
      • setPlayableFileExtensions

        public static void setPlayableFileExtensions​(java.lang.String str)
        This method available for player plugins to extend playable set if needed
        Parameters:
        str -
      • isEMPAvailable

        public static boolean isEMPAvailable()
      • playURL

        public static boolean playURL​(java.net.URL url,
                                      java.lang.String name)