Unverified Commit 5333d8a9 authored by FireMasterK's avatar FireMasterK
Browse files

Add more data.

parent 9c1a7f7d
......@@ -163,6 +163,7 @@ public class ItagItem {
private int initEnd;
private int indexStart;
private int indexEnd;
private String quality;
private String codec;
public int getBitrate() {
......@@ -221,6 +222,14 @@ public class ItagItem {
this.indexEnd = indexEnd;
}
public String getQuality() {
return quality;
}
public void setQuality(String quality) {
this.quality = quality;
}
public String getCodec() {
return codec;
}
......
......@@ -970,6 +970,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
itagItem.setIndexStart(Integer.parseInt(indexRange.getString("start", "-1")));
itagItem.setIndexEnd(Integer.parseInt(indexRange.getString("end", "-1")));
itagItem.fps = formatData.getInt("fps");
itagItem.setQuality(formatData.getString("quality"));
itagItem.setCodec(codec);
urlAndItags.put(streamUrl, itagItem);
......
......@@ -27,11 +27,13 @@ public class AudioStream extends Stream {
public int average_bitrate = -1;
// Fields for Dash
private int itag;
private int bitrate;
private int initStart;
private int initEnd;
private int indexStart;
private int indexEnd;
private String quality;
private String codec;
/**
......@@ -52,6 +54,8 @@ public class AudioStream extends Stream {
*/
public AudioStream(String url, ItagItem itag) {
this(url, itag.getMediaFormat(), itag.avgBitrate);
this.itag = itag.id;
this.quality = itag.getQuality();
this.bitrate = itag.getBitrate();
this.initStart = itag.getInitStart();
this.initEnd = itag.getInitEnd();
......@@ -74,6 +78,10 @@ public class AudioStream extends Stream {
return average_bitrate;
}
public int getItag() {
return itag;
}
public int getBitrate() {
return bitrate;
}
......@@ -94,6 +102,10 @@ public class AudioStream extends Stream {
return indexEnd;
}
public String getQuality() {
return quality;
}
public String getCodec() {
return codec;
}
......
......@@ -28,6 +28,7 @@ public class VideoStream extends Stream {
public final boolean isVideoOnly;
// Fields for Dash
private int itag;
private int bitrate;
private int initStart;
private int initEnd;
......@@ -36,6 +37,7 @@ public class VideoStream extends Stream {
private int width;
private int height;
private int fps;
private String quality;
private String codec;
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) {
this(url, itag.getMediaFormat(), itag.resolutionString, isVideoOnly);
this.itag = itag.id;
this.bitrate = itag.getBitrate();
this.initStart = itag.getInitStart();
this.initEnd = itag.getInitEnd();
......@@ -56,6 +59,7 @@ public class VideoStream extends Stream {
this.codec = itag.getCodec();
this.height = itag.getHeight();
this.width = itag.getWidth();
this.quality = itag.getQuality();
this.fps = itag.fps;
}
......@@ -96,6 +100,10 @@ public class VideoStream extends Stream {
return isVideoOnly;
}
public int getItag() {
return itag;
}
public int getBitrate() {
return bitrate;
}
......@@ -128,6 +136,10 @@ public class VideoStream extends Stream {
return fps;
}
public String getQuality() {
return quality;
}
public String getCodec() {
return codec;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment