Conversation
3de34a4 to
edcc217
Compare
We used to add only the track of the current frame when flushing, so it does not guarantee all tracks inclusion. With current approach we will have in a cluster all tracks on their first frame added.
| } | ||
| } | ||
|
|
||
| boolean addCue = !cluster.getTracks().contains(frame.getTrackNo()); |
There was a problem hiding this comment.
The isSeekable check was removed
| private boolean flagDefault = true; | ||
| private boolean flagForced = false; | ||
| private boolean flagLacing = true; | ||
| private boolean flagLacing = false; |
There was a problem hiding this comment.
I think this defaults to true in the spec, and it seems like a safe default (the track MAY contain blocks using lacing, while false asserts that it doesn't). Why change it? If we want it false for our case we should probably set it in jmr
There was a problem hiding this comment.
👍 will drop the commit.
|
|
||
| private long clusterLen = 0; | ||
|
|
||
| private long lastDuration = 0; |
There was a problem hiding this comment.
Suggest renaming to duration or segmentDuration
| defaultDuration = tr.getDefaultDuration(); | ||
| } | ||
|
|
||
| lastDuration = cluster.getLastTimecode() + TimeUnit.NANOSECONDS.toMillis(defaultDuration);; |
There was a problem hiding this comment.
This assumes that the first timecode is 0, and that frames from all tracks are always added in order (e.g. addFrame(track=1, timecode=1000); addFrame(track=2, timecode=900) is handled incorrectly and we may end up using something like that after buffering in jmr).
I suggest just saving the smallest and largest timecode of all frames added to the segment, then setting duration to the difference. cluster.getLastTimecode() is always just frame.getTimecode(), so no need to expose it
This pull request includes several updates to the Matroska file format handling in the
src/main/java/org/ebml/matroskadirectory. The changes primarily involve the addition and removal of elements in theMatroskaDocTypeenum and the correspondingMatroskaDocTypesclass, as well as updates to methods for writing and updating Matroska file elements.