Currently Video decoding path on android (both AVDA and MCVD) uses surface textures. Surface textures can be used to create only GL textures from the video frames.
Going forward we need to have capability to create Vulkan textures as well.
Hence to support this we need to use Android ImageReader (available from OREO). Using this new api we will be able to create both GL and vulkan texture from a video frame.
To implement this new AImageReader video decode path, we are breaking this task into following smaller subtasks :
1. Refactor existing surface texture gl owner code (/media/gpu/android/surface_texture_gl_owner.h) to remove the surface texture gl owner interface (SurfaceTextureGLOwner) from its implementation (SurfaceTextureGLOwnerImpl). Currently both interface and implementation are in single header file.
Also rename the interface from SurfaceTextureGLOwner to a generic name TextureOwner. This is because now we will have 2 different implementation of this interface - a.using surface texture, b. using AImageReader.
Link to patch - https://chromium-review.googlesource.com/c/chromium/src/+/1038125
2. Write a new utility/helper class to dynamically load the AImageReader functions for android versions >=OREO at runtime. Currently we are not able to directly bump up the android NDK version as it will not be backward compatible. Hence the only way to newer OS api is to dynamically load it.
Link to patch - https://chromium-review.googlesource.com/c/chromium/src/+/1031113/11
3. Implement new video decode path using AImageReader.
Link to patch - https://chromium-review.googlesource.com/c/chromium/src/+/963506/23
Comment 1 by bugdroid1@chromium.org
, May 3 2018