androidsurface: Use the ANativeWindow API where available
This makes the android vout work on Android 4.3.
This API is available since Android 2.3/Gingerbread (api level 9).
It's a public, official API, contrary to the earlier hacking by
accessing the internal C++ Surface class directly. In most cases,
the ANativeWindow API is a very thin wrapper doing pretty much
the same as the existing Surface class entry points we've been using.
In Android 4.3, the C++ Surface class lock function we've been using
was renamed again, but using the new corresponding function as
we've done before doesn't work any longer.
Therefore, use the public API where possible (loading it dynamically,
to not break compatibility with pre-2.3 devices).
The only non-public API used in the vout is now the YV12
pixel format, which doesn't work on all devices.
Signed-off-by: Martin Storsjö <martin@martin.st>
Showing
Please register or sign in to comment