Package com.biglybt.util
Class PlayUtils
- java.lang.Object
-
- com.biglybt.util.PlayUtils
-
public class PlayUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
actualPlayableFileExtensions
static boolean
COMPLETE_PLAY_ONLY
private static java.util.concurrent.atomic.AtomicInteger
dm_uid
private static java.util.Map<java.lang.String,java.lang.Object[]>
ext_play_cache
private static java.lang.Boolean
hasQuickTime
static java.lang.String
playableFileExtensions
Access to this static is deprecated - use get/setPlayableFileExtensions.private static java.lang.ThreadLocal<int[]>
tls_non_block_indicator
-
Constructor Summary
Constructors Constructor Description PlayUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static boolean
canPlay(DownloadManager dm, int file_index)
private static boolean
canPlay(TOTorrent torrent, int file_index)
static boolean
canPlayDS(java.lang.Object ds, int file_index, boolean block_for_accuracy)
private static boolean
canPlayViaExternalEMP(TOTorrent torrent, int file_index, boolean complete_only)
private static boolean
canStream(DownloadManager dm, int file_index)
static boolean
canStreamDS(java.lang.Object ds, int file_index, boolean block_for_accuracy)
static boolean
canUseEMP(TOTorrent torrent, int file_index)
static boolean
canUseEMP(TOTorrent torrent, int file_index, boolean complete_only)
static boolean
canUseEMP(DiskManagerFileInfo file)
static int[]
getExternallyPlayableFileIndexes(Download d, boolean complete_only)
static java.net.URL
getMediaServerContentURL(DiskManagerFileInfo file)
static java.lang.String
getPlayableFileExtensions()
static boolean
isEMPAvailable()
static boolean
isExternallyPlayable(TOTorrent torrent, int file_index, boolean complete_only)
private static boolean
isExternallyPlayable(DiskManagerFileInfo file)
static boolean
isExternallyPlayable(Download d, int file_index, boolean complete_only)
private static boolean
isExternallyPlayableSupport(Download d, int file_index, boolean complete_only)
static boolean
isStreamPermitted()
static boolean
playURL(java.net.URL url, java.lang.String name)
static boolean
prepareForPlay(DownloadManager dm)
static void
setPlayableFileExtensions(java.lang.String str)
This method available for player plugins to extend playable set if needed
-
-
-
Field Detail
-
COMPLETE_PLAY_ONLY
public static final boolean COMPLETE_PLAY_ONLY
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
prepareForPlay
public static boolean prepareForPlay(DownloadManager dm)
-
canUseEMP
public static boolean canUseEMP(DiskManagerFileInfo file)
-
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)
-
-