Map QuickTime com.android.manufacturer and com.android.model
RealDolos opened this issue · comments
Map com.android.manufacturer
to QuickTimeMetadataHeaderDirectory.TagMake
and com.android.model
to QuickTimeMetadataHeaderDirectory.TagModel
respectively.
A lot of the (newer) Android phones will use these tags instead of com.apple.quicktime.make
and com.apple.quicktime.model
, respectively.
I am running right now with this little cheat to avoid forking the lib and it seems to work fine:
var field =
(Dictionary<string, int>)typeof(QuickTimeMetadataHeaderDirectory).GetField(
"_nameTagMap",
BindingFlags.Static | BindingFlags.NonPublic)!.GetValue(null)!;
field.Add("com.android.manufacturer", QuickTimeMetadataHeaderDirectory.TagMake);
field.Add("com.android.model", QuickTimeMetadataHeaderDirectory.TagModel);
Mapping these tags onto Apple's QuickTime tags might not be to everybody's liking, but it seems reasonable to me because
- They mean the same things, except they use non-Apple names
- There is little chance for collisions where files have both set. If anything the values would be the same, or a bad video editor abused the fields. But most of the time either the Apple variant is present or the Android variant will be, but not both.
- If the Android versions got their own tag description codes, then any code using the library would be in danger of missing one or the other, or at least would become more complex having to check either version.
Thanks for this. I created new tags for these in #310, to avoid any potential for problem. It's less ergonomic to consume these, but potentially less surprising. We have a separate issue to track sourcing a conceptual value (such as model, date, etc) from multiple tags, which would help with the ergonomics.
Can you share an image that contains these values? None of the sample images we have registered a change following #310.