Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some EntityToGroupBoxes have additional data at the end of the box (see ISO/IEC 14496-12 section 8.18.3.2). Currently, the libheif Box_grpl class doesn't parse any additional data. This pull request resolves this issue by moving the EntityGroup struct to its own class which allows for other boxes to inherit from it and specify how to parse their own remaining data.
For use cases, see ISO/IEC 23008-12 section 6.8 Entity and Sample Groups which mention the following entity groups:
Equivalent Boxes (eqiz)
Burst Images (brst)
Time-synchronized group (tsyn)
Auto to Image group (iaug)
etc...
Personally, I'm interested in the Image Pyramid Entity Group (pymd) which will be added to HEIF version 3.
Sample Files:
C007.heic
Contains a grpl box with an "altr" EntityGroup. The altr box doesn't have additional data at the end of the box, so it can simply reuse the defined EntityGroup class. No Box_altr is required.
multilayer003.heic
Contains a grpl box with an "ster" EntityGroup. The ster box has an additional flag so the Box_ster parse_remaining() function accounts for this.