public abstract class Stream extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
int |
format
Deprecated.
Use
getFormat() or getFormatId() |
String |
torrentUrl |
String |
url |
Constructor and Description |
---|
Stream(String url,
MediaFormat format)
Instantiates a new stream object.
|
Stream(String url,
String torrentUrl,
MediaFormat format)
Instantiates a new stream object.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
containSimilarStream(Stream stream,
List<? extends Stream> streamList)
Check if the list already contains one stream with equals stats
|
boolean |
equals(Stream cmp)
Reveals whether two Streams are equal
|
boolean |
equalStats(Stream cmp)
Reveals whether two streams have the same stats (format and bitrate, for example)
|
MediaFormat |
getFormat()
Gets the format.
|
int |
getFormatId()
Gets the format id.
|
String |
getTorrentUrl()
Gets the torrent url.
|
String |
getUrl()
Gets the url.
|
public final String url
public final String torrentUrl
@Deprecated public final int format
getFormat()
or getFormatId()
public Stream(String url, MediaFormat format)
url
- the urlformat
- the formatpublic Stream(String url, String torrentUrl, MediaFormat format)
url
- the urltorrentUrl
- the url to torrent file, example
https://webtorrent.io/torrents/big-buck-bunny.torrentformat
- the formatpublic boolean equalStats(Stream cmp)
public boolean equals(Stream cmp)
public static boolean containSimilarStream(Stream stream, List<? extends Stream> streamList)
public String getUrl()
public String getTorrentUrl()
public MediaFormat getFormat()
public int getFormatId()