-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding parsing for 'J2KExtendedCapabilities' stored in the MXF header's 'JPEG2000SubDescriptor'. #382
Conversation
… be used for InterchangeObject inheritors. Passed in byteProvider directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A 50MB file isn't ideal, to have committed to the git repo. Do we have easy access to a much smaller HT J2K MXF? Or the ability to craft one ourselves?
We already have a couple of larger files in the test resources. So it isn't a big deal if we can't make this smaller. But its always good to try, when we can. The types of files covered by this might mean it is simply not possible to make a "small" test file though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - just replaced it with a ~4MB file.
else if (field.getType() == J2KExtendedCapabilities.class) { | ||
J2KExtendedCapabilities j2KExtendedCapabilities = new J2KExtendedCapabilities(byteProvider); | ||
field.set(object, j2KExtendedCapabilities); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it does feel very clean to recognize this as a top-level type. But I can't immediately think of a cleaner way to handle this within the current code. We are also already doing something similar for JPEG2000PictureComponentBO
a little further down. So this is probably okay.
We can consider this as something to clean up in a future refactoring, if we make improvements to the way we recognize MXF properties.
public final class J2KExtendedCapabilities { | ||
|
||
@MXFProperty(size=4) protected final Integer pCap = null; | ||
@MXFProperty(size=0, depends=true) protected final CompoundDataTypes.MXFCollections.MXFCollection<Short> cCapi = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets change this to cCap
, as the 'i' in the spec document is just used to indicate index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. 👍
I'm not an expert on HT J2K, but I don't see any obvious problems. Feel free to merge whenever you are happy with things.
No description provided.