File tree Expand file tree Collapse file tree
extractor/src/main/java/org/schabi/newpipe/extractor/stream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,23 @@ public abstract class Stream implements Serializable {
1616 @ Deprecated
1717 public final int format ;
1818
19+ /**
20+ * Instantiates a new stream object.
21+ *
22+ * @param url the url
23+ * @param format the format
24+ */
1925 public Stream (String url , MediaFormat format ) {
2026 this (url , null , format );
2127 }
2228
29+ /**
30+ * Instantiates a new stream object.
31+ *
32+ * @param url the url
33+ * @param torrentUrl the url to torrent file, example https://webtorrent.io/torrents/big-buck-bunny.torrent
34+ * @param format the format
35+ */
2336 public Stream (String url , String torrentUrl , MediaFormat format ) {
2437 this .url = url ;
2538 this .torrentUrl = torrentUrl ;
@@ -52,18 +65,38 @@ public static boolean containSimilarStream(Stream stream, List<? extends Stream>
5265 return false ;
5366 }
5467
68+ /**
69+ * Gets the url.
70+ *
71+ * @return the url
72+ */
5573 public String getUrl () {
5674 return url ;
5775 }
5876
77+ /**
78+ * Gets the torrent url.
79+ *
80+ * @return the torrent url, example https://webtorrent.io/torrents/big-buck-bunny.torrent
81+ */
5982 public String getTorrentUrl () {
6083 return torrentUrl ;
6184 }
6285
86+ /**
87+ * Gets the format.
88+ *
89+ * @return the format
90+ */
6391 public MediaFormat getFormat () {
6492 return mediaFormat ;
6593 }
6694
95+ /**
96+ * Gets the format id.
97+ *
98+ * @return the format id
99+ */
67100 public int getFormatId () {
68101 return mediaFormat .id ;
69102 }
You can’t perform that action at this time.
0 commit comments