DeviceAsWebcam: Don't set VIDEO_ENCODE flag if device opts out

DeviceAsWebcam is using USAGE_VIDEO_ENCODE [1] for buffers and
this results in combined usage: (VIDEO_ENCODER | CAMERA_OUTPUT).

On Qcom devices DeviceAsWebcam has red & blue colors swapped.

Originally we tried swapping HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS
with HAL_PIXEL_FORMAT_YCrCb_420_SP_VENUS in libgrallocutils,
however that inverted regular camera recording colors in some cases.

[1] https://android.googlesource.com/platform/packages/services/DeviceAsWebcam/+/d079a82ba4f773210c01d488d2dfa1d4d25be8e2

Change-Id: I3179b5c5a0a89989b65f41143caa6c4afe068ce7
1 file changed