ohos: Fix blank camera preview
The ESSL 3.00 external sampler shader is baked in verbatim, so the
licence header ended up ahead of the #version directive and the driver
rejected the shader. Move #version to the first line.
The preview then still showed a single frozen frame. The camera session
always creates a preview output, backed by an offscreen RHI when the
video sink does not have one yet, so the condition meant to re-attach
the preview once the sink got an RHI could never be true. Remember the
surface the session was started with and rebuild the session when that
surface is replaced.
Recreating the surface destroyed the RHI before the external texture
and the copy pipeline that belong to it, because the reuse check
compared the texture thread's own RHI against the caller's and so never
matched. Compare the shared GL context instead, held so that a
destroyed context cannot be matched by a recycled address, and release
the old resources before replacing it.
Fixes: QTBUG-150290
Pick-to: 6.12
Change-Id: I2f67a91ac242153bb13838f7cd9cdd5cbd240547
Reviewed-by: Liang Qi <liang.qi@qt.io>