mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 16:00:33 +05:30
commit
27a20e41cd
@ -163,6 +163,7 @@ public class ItagItem {
|
|||||||
private int initEnd;
|
private int initEnd;
|
||||||
private int indexStart;
|
private int indexStart;
|
||||||
private int indexEnd;
|
private int indexEnd;
|
||||||
|
private String quality;
|
||||||
private String codec;
|
private String codec;
|
||||||
|
|
||||||
public int getBitrate() {
|
public int getBitrate() {
|
||||||
@ -221,6 +222,14 @@ public class ItagItem {
|
|||||||
this.indexEnd = indexEnd;
|
this.indexEnd = indexEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQuality() {
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuality(String quality) {
|
||||||
|
this.quality = quality;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodec() {
|
public String getCodec() {
|
||||||
return codec;
|
return codec;
|
||||||
}
|
}
|
||||||
|
@ -970,6 +970,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||||||
itagItem.setIndexStart(Integer.parseInt(indexRange.getString("start", "-1")));
|
itagItem.setIndexStart(Integer.parseInt(indexRange.getString("start", "-1")));
|
||||||
itagItem.setIndexEnd(Integer.parseInt(indexRange.getString("end", "-1")));
|
itagItem.setIndexEnd(Integer.parseInt(indexRange.getString("end", "-1")));
|
||||||
itagItem.fps = formatData.getInt("fps");
|
itagItem.fps = formatData.getInt("fps");
|
||||||
|
itagItem.setQuality(formatData.getString("quality"));
|
||||||
itagItem.setCodec(codec);
|
itagItem.setCodec(codec);
|
||||||
|
|
||||||
urlAndItags.put(streamUrl, itagItem);
|
urlAndItags.put(streamUrl, itagItem);
|
||||||
|
@ -27,11 +27,13 @@ public class AudioStream extends Stream {
|
|||||||
public int average_bitrate = -1;
|
public int average_bitrate = -1;
|
||||||
|
|
||||||
// Fields for Dash
|
// Fields for Dash
|
||||||
|
private int itag;
|
||||||
private int bitrate;
|
private int bitrate;
|
||||||
private int initStart;
|
private int initStart;
|
||||||
private int initEnd;
|
private int initEnd;
|
||||||
private int indexStart;
|
private int indexStart;
|
||||||
private int indexEnd;
|
private int indexEnd;
|
||||||
|
private String quality;
|
||||||
private String codec;
|
private String codec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,6 +54,8 @@ public class AudioStream extends Stream {
|
|||||||
*/
|
*/
|
||||||
public AudioStream(String url, ItagItem itag) {
|
public AudioStream(String url, ItagItem itag) {
|
||||||
this(url, itag.getMediaFormat(), itag.avgBitrate);
|
this(url, itag.getMediaFormat(), itag.avgBitrate);
|
||||||
|
this.itag = itag.id;
|
||||||
|
this.quality = itag.getQuality();
|
||||||
this.bitrate = itag.getBitrate();
|
this.bitrate = itag.getBitrate();
|
||||||
this.initStart = itag.getInitStart();
|
this.initStart = itag.getInitStart();
|
||||||
this.initEnd = itag.getInitEnd();
|
this.initEnd = itag.getInitEnd();
|
||||||
@ -74,6 +78,10 @@ public class AudioStream extends Stream {
|
|||||||
return average_bitrate;
|
return average_bitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getItag() {
|
||||||
|
return itag;
|
||||||
|
}
|
||||||
|
|
||||||
public int getBitrate() {
|
public int getBitrate() {
|
||||||
return bitrate;
|
return bitrate;
|
||||||
}
|
}
|
||||||
@ -94,6 +102,10 @@ public class AudioStream extends Stream {
|
|||||||
return indexEnd;
|
return indexEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQuality() {
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodec() {
|
public String getCodec() {
|
||||||
return codec;
|
return codec;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ public class VideoStream extends Stream {
|
|||||||
public final boolean isVideoOnly;
|
public final boolean isVideoOnly;
|
||||||
|
|
||||||
// Fields for Dash
|
// Fields for Dash
|
||||||
|
private int itag;
|
||||||
private int bitrate;
|
private int bitrate;
|
||||||
private int initStart;
|
private int initStart;
|
||||||
private int initEnd;
|
private int initEnd;
|
||||||
@ -36,6 +37,7 @@ public class VideoStream extends Stream {
|
|||||||
private int width;
|
private int width;
|
||||||
private int height;
|
private int height;
|
||||||
private int fps;
|
private int fps;
|
||||||
|
private String quality;
|
||||||
private String codec;
|
private String codec;
|
||||||
|
|
||||||
public VideoStream(String url, MediaFormat format, String resolution) {
|
public VideoStream(String url, MediaFormat format, String resolution) {
|
||||||
@ -48,6 +50,7 @@ public class VideoStream extends Stream {
|
|||||||
|
|
||||||
public VideoStream(String url, boolean isVideoOnly, ItagItem itag) {
|
public VideoStream(String url, boolean isVideoOnly, ItagItem itag) {
|
||||||
this(url, itag.getMediaFormat(), itag.resolutionString, isVideoOnly);
|
this(url, itag.getMediaFormat(), itag.resolutionString, isVideoOnly);
|
||||||
|
this.itag = itag.id;
|
||||||
this.bitrate = itag.getBitrate();
|
this.bitrate = itag.getBitrate();
|
||||||
this.initStart = itag.getInitStart();
|
this.initStart = itag.getInitStart();
|
||||||
this.initEnd = itag.getInitEnd();
|
this.initEnd = itag.getInitEnd();
|
||||||
@ -56,6 +59,7 @@ public class VideoStream extends Stream {
|
|||||||
this.codec = itag.getCodec();
|
this.codec = itag.getCodec();
|
||||||
this.height = itag.getHeight();
|
this.height = itag.getHeight();
|
||||||
this.width = itag.getWidth();
|
this.width = itag.getWidth();
|
||||||
|
this.quality = itag.getQuality();
|
||||||
this.fps = itag.fps;
|
this.fps = itag.fps;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +100,10 @@ public class VideoStream extends Stream {
|
|||||||
return isVideoOnly;
|
return isVideoOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getItag() {
|
||||||
|
return itag;
|
||||||
|
}
|
||||||
|
|
||||||
public int getBitrate() {
|
public int getBitrate() {
|
||||||
return bitrate;
|
return bitrate;
|
||||||
}
|
}
|
||||||
@ -128,6 +136,10 @@ public class VideoStream extends Stream {
|
|||||||
return fps;
|
return fps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQuality() {
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodec() {
|
public String getCodec() {
|
||||||
return codec;
|
return codec;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user