misc changes
* read "SeekPreRoll" from the source track (if available) * use the longest track duration as segment duration, instead of the video track duration * do not hardcode the "Cue" reserved space behavior * do not hardcode the "EBML Void" element, unreported issue. The size was not properly calculated * rewrite the key-frame picking * remove writeInt(), writeFloat() and writeShort() methods, use inline code * set "SeekPreRoll" and "CodecDelays" values on output tracks (if available) * rewrite the "Cluster" maker * rewrite the code of how "Cluster" sizes are written Fix encode() method (the reason of this commit/pull-request): * Use the unsigned shift operator instead of dividing the value, due precession lost
This commit is contained in:
parent
f7822a448e
commit
ca8f8e0ee9
@ -37,6 +37,7 @@ public class WebMReader {
|
||||
private final static int ID_DefaultDuration = 0x3E383;
|
||||
private final static int ID_FlagLacing = 0x1C;
|
||||
private final static int ID_CodecDelay = 0x16AA;
|
||||
private final static int ID_SeekPreRoll = 0x16BB;
|
||||
|
||||
private final static int ID_Cluster = 0x0F43B675;
|
||||
private final static int ID_Timecode = 0x67;
|
||||
@ -332,6 +333,10 @@ public class WebMReader {
|
||||
break;
|
||||
case ID_CodecDelay:
|
||||
entry.codecDelay = readNumber(elem);
|
||||
break;
|
||||
case ID_SeekPreRoll:
|
||||
entry.seekPreRoll = readNumber(elem);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -414,8 +419,9 @@ public class WebMReader {
|
||||
public byte[] codecPrivate;
|
||||
public byte[] bMetadata;
|
||||
public TrackKind kind;
|
||||
public long defaultDuration;
|
||||
public long codecDelay;
|
||||
public long defaultDuration = -1;
|
||||
public long codecDelay = -1;
|
||||
public long seekPreRoll = -1;
|
||||
}
|
||||
|
||||
public class Segment {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user