-
Notifications
You must be signed in to change notification settings - Fork 257
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
NdkMediaCodec.h: Issue with off_t in signature and use of __USE_FILE_OFFSET64 #459
Comments
Good timing, was just getting to cherry-picking I grepped the sysroot for any other cases of this outside libc, looks like we have one in asset_manager.h too. |
NdkMediaCodec.h: https://android-review.googlesource.com/c/437595/ |
Thanks already. Am I correct reading that the chosen solution is to enforce undef'ing __USE_FILE_OFFSET64? Regarding the asset manager part, do you confirm the 64 bits version are available on arm32 as well? |
no, asset_manager.h actually has both off_t and off64_t variants, so we can make _FILE_OFFSET_BITS=64 do the right thing there. for NdkMediaCodec.h, we're suggesting doing the same as we do for the bionic headers, where you get everything you can have (which in this case means you lose the off_t functions, because there still aren't off64_t variants). |
Ok, but it makes little sense to remove just those 2 functions, though, as it makes the api unusable. Now, there is still the |
yeah, that's why we need to chase down the API owner. if they are mandatory then, yes, #error if _FILE_OFFSET_BITS=64 is defined for LP32 probably makes more sense (and is certainly closer to previous behavior). |
Convenience macro for __RENAME if __USE_FILE_OFFSET64 mode. Lets us avoid duplicating all the doxygen comments in frameworks headers. Test: make checkbuild Bug: android/ndk#459 Change-Id: Ica44f22b2f1596e484694006c0926d94d16187b5
cf. android/ndk#459 (cherry picked from commit c454d1737f1b4bf2ba10c1eb3cbdbfc8b37d512b) Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Convenience macro for __RENAME if __USE_FILE_OFFSET64 mode. Lets us avoid duplicating all the doxygen comments in frameworks headers. Test: make checkbuild Bug: android/ndk#459 Change-Id: Ica44f22b2f1596e484694006c0926d94d16187b5
Test: make checkbuild Bug: android/ndk#459 Change-Id: I72528ca13d1f82debec977efbab62e638b000dfc
Test: make checkbuild Bug: android/ndk#459 Change-Id: I72528ca13d1f82debec977efbab62e638b000dfc
Test: make checkbuild Bug: android/ndk#459 Change-Id: I72528ca13d1f82debec977efbab62e638b000dfc
Rename off_t based functions to their 64-bit equivalents if we're in LP32 with a 64-bit off_t. We can safely do this for all supported API levels now since API 13 is no longer supported. Clean up all the guards for that API level while I'm here. Test: make checkbuild Bug: android/ndk#459 Change-Id: I7032e94c7288f87b4895411079216f0ac2cab6bc
Description
NdkMediaCodec.h
defines:When arm32 is built with
__USE_FILE_OFFSET64
, theoff_t
's above are defined asoff64_t
, leading to a non functional MediaCodec (no crashes, though).Manually changing the off_t to
size_t
workarounds the issue (haven't tried arm64, yet, but it should work, too).Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
The text was updated successfully, but these errors were encountered: