Aimagereader's Onimageavailablecallback Is Not Being Called
I'm trying to make a Screenshot App using NDK rather than Java (Think of it as some experimentation, I know java code is much simpler, but im thinking of doing it via NDK). So, I'v
Solution 1:
I think you have mistake in your code:
ANativeWindow *nativeWindow = ANativeWindow_fromSurface(env, surface);
...
status = AImageReader_getWindow(imageReader, &nativeWindow);
In the function "AImageReader_getWindow"
media_status_t AImageReader_getWindow(AImageReader* reader, /*out*/ANativeWindow** window) __INTRODUCED_IN(24);
the window parameter is not in, is out. and your AImageReader is not connected to the java surface.
NOTE
Maybe if you can convert your ANativeWindow (from AImageReader) to surface and use it in java, it's will work.
Post a Comment for "Aimagereader's Onimageavailablecallback Is Not Being Called"