mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 09:00:31 +00:00
remove netbeans editor-fold comments
This commit is contained in:
parent
aae8865bdd
commit
5a2cd93d13
@ -15,7 +15,6 @@ import java.util.NoSuchElementException;
|
|||||||
*/
|
*/
|
||||||
public class Mp4DashReader {
|
public class Mp4DashReader {
|
||||||
|
|
||||||
// <editor-fold defaultState="collapsed" desc="Constants">
|
|
||||||
private static final int ATOM_MOOF = 0x6D6F6F66;
|
private static final int ATOM_MOOF = 0x6D6F6F66;
|
||||||
private static final int ATOM_MFHD = 0x6D666864;
|
private static final int ATOM_MFHD = 0x6D666864;
|
||||||
private static final int ATOM_TRAF = 0x74726166;
|
private static final int ATOM_TRAF = 0x74726166;
|
||||||
@ -50,7 +49,7 @@ public class Mp4DashReader {
|
|||||||
private static final int HANDLER_VIDE = 0x76696465;
|
private static final int HANDLER_VIDE = 0x76696465;
|
||||||
private static final int HANDLER_SOUN = 0x736F756E;
|
private static final int HANDLER_SOUN = 0x736F756E;
|
||||||
private static final int HANDLER_SUBT = 0x73756274;
|
private static final int HANDLER_SUBT = 0x73756274;
|
||||||
// </editor-fold>
|
|
||||||
|
|
||||||
private final DataReader stream;
|
private final DataReader stream;
|
||||||
|
|
||||||
@ -293,7 +292,8 @@ public class Mp4DashReader {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// <editor-fold defaultState="collapsed" desc="Utils">
|
|
||||||
|
|
||||||
private long readUint() throws IOException {
|
private long readUint() throws IOException {
|
||||||
return stream.readInt() & 0xffffffffL;
|
return stream.readInt() & 0xffffffffL;
|
||||||
}
|
}
|
||||||
@ -392,9 +392,7 @@ public class Mp4DashReader {
|
|||||||
return readBox();
|
return readBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
// </editor-fold>
|
|
||||||
|
|
||||||
// <editor-fold defaultState="collapsed" desc="Box readers">
|
|
||||||
|
|
||||||
private Moof parse_moof(Box ref, int trackId) throws IOException {
|
private Moof parse_moof(Box ref, int trackId) throws IOException {
|
||||||
Moof obj = new Moof();
|
Moof obj = new Moof();
|
||||||
@ -795,9 +793,8 @@ public class Mp4DashReader {
|
|||||||
return readFullBox(b);
|
return readFullBox(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// </editor-fold>
|
|
||||||
|
|
||||||
// <editor-fold defaultState="collapsed" desc="Helper classes">
|
|
||||||
class Box {
|
class Box {
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
@ -1013,5 +1010,5 @@ public class Mp4DashReader {
|
|||||||
public TrunEntry info;
|
public TrunEntry info;
|
||||||
public byte[] data;
|
public byte[] data;
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public class Mp4FromDashWriter {
|
|||||||
|
|
||||||
boolean singleChunk = tracks.length == 1 && tracks[0].kind == TrackKind.Audio;
|
boolean singleChunk = tracks.length == 1 && tracks[0].kind == TrackKind.Audio;
|
||||||
|
|
||||||
//<editor-fold defaultstate="expanded" desc="calculate stbl sample tables size and required moov values">
|
|
||||||
for (int i = 0; i < readers.length; i++) {
|
for (int i = 0; i < readers.length; i++) {
|
||||||
int samplesSize = 0;
|
int samplesSize = 0;
|
||||||
int sampleSizeChanges = 0;
|
int sampleSizeChanges = 0;
|
||||||
@ -255,7 +255,7 @@ public class Mp4FromDashWriter {
|
|||||||
tracks[i].trak.tkhd.duration = sampleExtra[i];// this never should happen
|
tracks[i].trak.tkhd.duration = sampleExtra[i];// this never should happen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
boolean is64 = read > THRESHOLD_FOR_CO64;
|
boolean is64 = read > THRESHOLD_FOR_CO64;
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ public class Mp4FromDashWriter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// <editor-fold defaultstate="expanded" desc="Stbl handling">
|
|
||||||
private int writeEntry64(int offset, long value) throws IOException {
|
private int writeEntry64(int offset, long value) throws IOException {
|
||||||
outBackup();
|
outBackup();
|
||||||
|
|
||||||
@ -469,9 +469,9 @@ public class Mp4FromDashWriter {
|
|||||||
lastWriteOffset = -1;
|
lastWriteOffset = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// </editor-fold>
|
|
||||||
|
|
||||||
// <editor-fold defaultstate="expanded" desc="Utils">
|
|
||||||
|
|
||||||
private void outWrite(byte[] buffer) throws IOException {
|
private void outWrite(byte[] buffer) throws IOException {
|
||||||
outWrite(buffer, buffer.length);
|
outWrite(buffer, buffer.length);
|
||||||
}
|
}
|
||||||
@ -581,9 +581,9 @@ public class Mp4FromDashWriter {
|
|||||||
private int auxOffset() {
|
private int auxOffset() {
|
||||||
return auxBuffer == null ? (int) writeOffset : auxBuffer.position();
|
return auxBuffer == null ? (int) writeOffset : auxBuffer.position();
|
||||||
}
|
}
|
||||||
// </editor-fold>
|
|
||||||
|
|
||||||
// <editor-fold defaultstate="expanded" desc="Box makers">
|
|
||||||
|
|
||||||
private int make_ftyp() throws IOException {
|
private int make_ftyp() throws IOException {
|
||||||
byte[] buffer = new byte[]{
|
byte[] buffer = new byte[]{
|
||||||
0x00, 0x00, 0x00, 0x1C, 0x66, 0x74, 0x79, 0x70,// ftyp
|
0x00, 0x00, 0x00, 0x1C, 0x66, 0x74, 0x79, 0x70,// ftyp
|
||||||
@ -815,7 +815,7 @@ public class Mp4FromDashWriter {
|
|||||||
|
|
||||||
return buffer.array();
|
return buffer.array();
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
class TablesInfo {
|
class TablesInfo {
|
||||||
|
|
||||||
|
@ -308,7 +308,8 @@ public class OggFromWebMWriter implements Closeable {
|
|||||||
buffer.position(0);
|
buffer.position(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="WebM track handling">
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private SimpleBlock getNextBlock() throws IOException {
|
private SimpleBlock getNextBlock() throws IOException {
|
||||||
SimpleBlock res;
|
SimpleBlock res;
|
||||||
@ -359,9 +360,7 @@ public class OggFromWebMWriter implements Closeable {
|
|||||||
|
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="Segment table writing">
|
|
||||||
private void clearSegmentTable() {
|
private void clearSegmentTable() {
|
||||||
segment_table_next_timestamp += TIME_SCALE_NS;
|
segment_table_next_timestamp += TIME_SCALE_NS;
|
||||||
packet_flag = FLAG_UNSET;
|
packet_flag = FLAG_UNSET;
|
||||||
@ -407,9 +406,7 @@ public class OggFromWebMWriter implements Closeable {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="Checksum CRC32">
|
|
||||||
private void populate_crc32_table() {
|
private void populate_crc32_table() {
|
||||||
for (int i = 0; i < 0x100; i++) {
|
for (int i = 0; i < 0x100; i++) {
|
||||||
int crc = i << 24;
|
int crc = i << 24;
|
||||||
@ -430,5 +427,5 @@ public class OggFromWebMWriter implements Closeable {
|
|||||||
|
|
||||||
return initial_crc;
|
return initial_crc;
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import java.util.NoSuchElementException;
|
|||||||
*/
|
*/
|
||||||
public class WebMReader {
|
public class WebMReader {
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="constants">
|
|
||||||
private final static int ID_EMBL = 0x0A45DFA3;
|
private final static int ID_EMBL = 0x0A45DFA3;
|
||||||
private final static int ID_EMBLReadVersion = 0x02F7;
|
private final static int ID_EMBLReadVersion = 0x02F7;
|
||||||
private final static int ID_EMBLDocType = 0x0282;
|
private final static int ID_EMBLDocType = 0x0282;
|
||||||
@ -44,7 +43,7 @@ public class WebMReader {
|
|||||||
private final static int ID_SimpleBlock = 0x23;
|
private final static int ID_SimpleBlock = 0x23;
|
||||||
private final static int ID_Block = 0x21;
|
private final static int ID_Block = 0x21;
|
||||||
private final static int ID_GroupBlock = 0x20;
|
private final static int ID_GroupBlock = 0x20;
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
public enum TrackKind {
|
public enum TrackKind {
|
||||||
Audio/*2*/, Video/*1*/, Other
|
Audio/*2*/, Video/*1*/, Other
|
||||||
@ -110,7 +109,8 @@ public class WebMReader {
|
|||||||
return segment;
|
return segment;
|
||||||
}
|
}
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="utils">
|
|
||||||
|
|
||||||
private long readNumber(Element parent) throws IOException {
|
private long readNumber(Element parent) throws IOException {
|
||||||
int length = (int) parent.contentSize;
|
int length = (int) parent.contentSize;
|
||||||
long value = 0;
|
long value = 0;
|
||||||
@ -225,9 +225,9 @@ public class WebMReader {
|
|||||||
|
|
||||||
stream.skipBytes(skip);
|
stream.skipBytes(skip);
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
//<editor-fold defaultState="collapsed" desc="elements readers">
|
|
||||||
|
|
||||||
private boolean readEbml(Element ref, int minReadVersion, int minDocTypeVersion) throws IOException {
|
private boolean readEbml(Element ref, int minReadVersion, int minDocTypeVersion) throws IOException {
|
||||||
Element elem = untilElement(ref, ID_EMBLReadVersion);
|
Element elem = untilElement(ref, ID_EMBLReadVersion);
|
||||||
if (elem == null) {
|
if (elem == null) {
|
||||||
@ -389,9 +389,9 @@ public class WebMReader {
|
|||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="class helpers">
|
|
||||||
|
|
||||||
class Element {
|
class Element {
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
@ -536,5 +536,5 @@ public class WebMReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user