Assigned
Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
Sorry the 0x1
was due to an error on my side - I was still using the VideoPipeline instead of the CameraEffect.
So the CameraEffect now properly uses ImageFormat.PRIVATE
(0x22
), but the problem still stands - I would like to use ImageFormat.YUV_420_888
here.
This should be possible, right? A SurfaceView
can render YUV_420_888, and an OpenGL external texture can also be in YUV_420_888, so I don't see a reason this shouldn't be possible. Would be great to be able to override/configure that! :)
fu...@google.com <fu...@google.com> #3
Generally devices use private format for preview surfaces, YUV can be obtained from the imageAnalysis use case (imageReader)
Description
CAMERAX VERSION 1.4.0-alpha04
CAMERA APPLICATION NAME AND VERSION: 9.1.0.338
ANDROID OS BUILD NUMBER: 29
DEVICE NAME: Huawei P10 (VTR-L29)
DESCRIPTION:
I have my own custom
VideoPipeline
which first analyzes frames using CPU access (ImageReader
) and then passes them on to a OpenGL pipeline to draw stuff onto the Frame, and finally renders the modified frame to an output surface (MediaRecorder).This is my code:
It will successfully create the Surfaces, but once the first Frame arrives in the ImageReader, calling
acquireNextImage()
will immediately crash with the following error:I think there are multiple questions I have in this bug report:
0x1
(PixelFormat.RGBA_8888
) when my ImageReader is configured with format0x23
(ImageFormat.YUV_420_888
)?VideoOutput
the right approach here so I can then use this as aVideoCapture
use-case for the Camera? Or should I extendUseCase
?Recorder
/Recording
instance myself to render into it's Surface with the OpenGL pipeline? I want to avoid rebuilding the entire MediaMuxer part.LIST ANY EXPERIMENTAL FEATURES:
STEPS TO REPRODUCE:
VideoOutput
onSurfaceRequested
, create anImageReader
with YUV format and return it's surfaceOBSERVED RESULTS: When the
ImageReader
's frame available callback is called, acquiring an Image will immediately crash because the Surface formats don't matchEXPECTED RESULTS: The Camera should be configured to the Surface format of the ImageReader (here, YUV_420_888 or PRIVATE) to avoid that crash
REPRODUCIBILITY: 100