QCamera3: Set the gralloc usage of dummy batch stream correctly

A dummy batch video stream is used internally in case clients are
working in constrained operating mode without an actual video stream.
The dummy stream is using exactly the same stream parameters as the
preview which includes the gralloc usage and this will eventually
override the dummy stream type from video to preview. Trying to link
two preview streams with batching enabled in camera backend will
result in failures.
Additionally fix a possible double free of the batched buffer
definitions inside the dummy batched stream. The stream will never
start and as a result stop will not be called as well. However
batched buffer definition will get allocated and en-queued inside the
free batched queue. If we avoid stopping, we also skip flushing any of
the free buffers inside the queue. They will remain in the queue until the
stream object gets destroyed. The queue flush implementation will try to
release the queue node data which at this point is already freed by the
camera interface layer.

Bug: 70631003
Test: Camera CTS
Change-Id: I9e0c222397a42e51a1343ab17a7285dbc9e1b76d
(cherry picked from bc2107272699f39ab4324ac1231ab27b7be5ba69)
2 files changed
tree: 59a4928163ebda2c21021fd1e182e132c610de3b
  1. msm8998/
  2. Android.mk
  3. CleanSpec.mk