LostBeard / SpawnDev.EBML

An extendable .Net library for reading and writing Extensible Binary Meta Language (aka EBML) documents. Includes schema for Matroska and WebM.
https://lostbeard.github.io/SpawnDev.EBML/
MIT License
9 stars 1 forks source link

Add Cluster and Tags to DefaultSeekHeadTargets #7

Open Zeugma440 opened 2 months ago

Zeugma440 commented 2 months ago

You're welcome 😉

LostBeard commented 2 months ago

Cluster and Tags can occur multiple times in a Segment. Which one(s) should it create Seek entries for? The others are there because they can only occur once, so auto-populating for those is easy.

LostBeard commented 2 months ago

Without adding those entries it already will update all Seek entries that are found, including Cluster and Tags

Zeugma440 commented 2 months ago

Without adding those entries it already will update all Seek entries that are found, including Cluster and Tags

I added those because I had an issue where adding a new Tags entry over a file that hadn't any wouldn't be taken into account into SeekHead. The content of that PR fixed it for me.

In all honesty, my library won't add extra Cluster elements, so you may skip that one if that's easier for you.

Cluster and Tags can occur multiple times in a Segment. Which one(s) should it create Seek entries for? The others are there because they can only occur once, so auto-populating for those is easy.

I didn't realize Tags could occur multiple times 👍 Specs aren't super clear about how SeekHead should react to indexing multiple instances of the same element, and I don't plan on writing multiple Tags elements in my library anyway, so maybe we should support indexing the first one only, and wait until the use case for multiple Tags arises?