0
votes

If I use 'setPreviewDisplay' in the Camera, like the api below

public final void setPreviewDisplay (SurfaceHolder holder)

What kind of format will be passed to SurfaceHolder for display? Is it NY21 or YV12?

Thank you.

1

1 Answers

0
votes

The exact format is platform-dependent, since the image frames sent to a Surface are not accessible to applications.

In fact, it may not be any of the formats listed in android.graphics.ImageFormat, since for efficiency, an entirely device-specific format may be in use, with different padding and stride requirements.

Do you have some use case in mind where knowing the format is important? Since the data is not accessible, I'm curious as to what that is.