Methods Summary |
---|
public void | _parseDetails(java.nio.ByteBuffer content)
BitReaderBuffer brb = new BitReaderBuffer(content);
dataRate = brb.readBits(13);
numIndSub = brb.readBits(3) + 1;
// This field indicates the number of independent substreams that are present in the Enhanced AC-3 bitstream. The value
// of this field is one less than the number of independent substreams present.
for (int i = 0; i < numIndSub; i++) {
Entry e = new Entry();
e.fscod = brb.readBits(2);
e.bsid = brb.readBits(5);
e.bsmod = brb.readBits(5);
e.acmod = brb.readBits(3);
e.lfeon = brb.readBits(1);
e.reserved = brb.readBits(3);
e.num_dep_sub = brb.readBits(4);
if (e.num_dep_sub > 0) {
e.chan_loc = brb.readBits(9);
} else {
e.reserved2 = brb.readBits(1);
}
entries.add(e);
}
|
public void | addEntry(com.googlecode.mp4parser.boxes.EC3SpecificBox$Entry entry)
this.entries.add(entry);
|
public void | getContent(java.nio.ByteBuffer byteBuffer)
BitWriterBuffer bwb = new BitWriterBuffer(byteBuffer);
bwb.writeBits(dataRate, 13);
bwb.writeBits(entries.size() - 1, 3);
for (Entry e : entries) {
bwb.writeBits(e.fscod, 2);
bwb.writeBits(e.bsid, 5);
bwb.writeBits(e.bsmod, 5);
bwb.writeBits(e.acmod, 3);
bwb.writeBits(e.lfeon, 1);
bwb.writeBits(e.reserved, 3);
bwb.writeBits(e.num_dep_sub, 4);
if (e.num_dep_sub > 0) {
bwb.writeBits(e.chan_loc, 9);
} else {
bwb.writeBits(e.reserved2, 1);
}
}
|
public long | getContentSize()
long size = 2;
for (Entry entry : entries) {
if (entry.num_dep_sub > 0) {
size += 4;
} else {
size += 3;
}
}
return size;
|
public int | getDataRate()
return dataRate;
|
public java.util.List | getEntries()
return entries;
|
public int | getNumIndSub()
return numIndSub;
|
public void | setDataRate(int dataRate)
this.dataRate = dataRate;
|
public void | setEntries(java.util.List entries)
this.entries = entries;
|
public void | setNumIndSub(int numIndSub)
this.numIndSub = numIndSub;
|