Fix v4l2loopback exclusive_caps, YU12->NV21 conversion, cameraserver crash

- Add exclusive_caps=0 to v4l2loopback insmod params to allow multiple
  simultaneous readers (HAL + verification capture)
- Fix YU12->NV21 pixel format conversion in V4L2 reader thread
- Fix YUYV->NV21 conversion as well
- Fix cameraserver crash by setting inputBuffer.streamId = -1
- Enable Hal Buffer Manager for requestStreamBuffers support
- Add JPEG_MAX_SIZE and JPEG_AVAILABLE_THUMBNAIL_SIZES metadata
- Add availableRequestKeys and availableResultKeys metadata
- Fix consumerUsage=0 for output streams (Camera3Device requirement)
- Fix metadata buffer overflow (2048->4096 bytes)
This commit is contained in:
2026-05-14 21:19:41 +02:00
parent 0e399ce02f
commit 6bd51ff38b
5 changed files with 1 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ kill -9 $(pgrep -f camera-provider-2-7-google) 2>/dev/null || true
# Reload v4l2loopback (rmmod first to clear stale params like exclusive_caps)
rmmod v4l2loopback 2>/dev/null || true
sleep 1
insmod "$MODDIR/v4l2loopback.ko" devices=2 video_nr=0,1 card_label="VirtualCam" 2>/dev/null || true
timeout 10 insmod "$MODDIR/v4l2loopback.ko" devices=2 video_nr=0,1 card_label="VirtualCam" exclusive_caps=0 2>/dev/null || echo "[$(date)] insmod timed out or failed"
# Copy provider binary and AIDL libs
PROVIDER_DST="/data/local/tmp/virtual_camera_provider"
Binary file not shown.