fixing daemon for cam
This commit is contained in:
parent
41a64664e0
commit
23c25297bc
@ -116,22 +116,28 @@ echo 32 >"$U/req_number" 2>/dev/null || true
|
||||
mkdir -p "$G/functions/uvc.usb0"
|
||||
F="$G/functions/uvc.usb0"
|
||||
|
||||
# -- 1. BUILD A MINIMAL MJPEG FORMAT (1280×720 @30 fps) ------------
|
||||
mkdir -p "$F/streaming/uncompressed/u1"
|
||||
echo 1280 >"$F/streaming/uncompressed/u1/wWidth"
|
||||
echo 720 >"$F/streaming/uncompressed/u1/wHeight"
|
||||
echo 2764800 >"$F/streaming/uncompressed/u1/dwMaxVideoFrameBufferSize"
|
||||
echo 333333 >"$F/streaming/uncompressed/u1/dwFrameInterval(0)" # 30 fps
|
||||
echo 1 >"$F/streaming/uncompressed/u1/bFrameIndex"
|
||||
echo 1 >"$F/streaming/uncompressed/u1/bmFramingInfo"
|
||||
# ── 1. FORMAT DESCRIPTOR ──────────────────────────────────────────
|
||||
# Uncompressed YUY2, 16 bpp
|
||||
mkdir -p "$F/streaming/uncompressed/u"
|
||||
echo YUY2 >"$F/streaming/uncompressed/u/guidFormat"
|
||||
echo 16 >"$F/streaming/uncompressed/u/bBitsPerPixel"
|
||||
|
||||
# -- 2. STREAMING‑HEADER and CONTROL‑HEADER LINKS (required) -------
|
||||
# ── 2. FRAME DESCRIPTOR (index 1) ─────────────────────────────────
|
||||
mkdir -p "$F/streaming/uncompressed/u/f1"
|
||||
echo 1280 >"$F/streaming/uncompressed/u/f1/wWidth"
|
||||
echo 720 >"$F/streaming/uncompressed/u/f1/wHeight"
|
||||
echo 2764800 >"$F/streaming/uncompressed/u/f1/dwMaxVideoFrameBufferSize"
|
||||
echo 333333 >"$F/streaming/uncompressed/u/f1/dwDefaultFrameInterval" # 30 fps
|
||||
echo 333333 >"$F/streaming/uncompressed/u/f1/dwFrameInterval"
|
||||
|
||||
# ── 3. REQUIRED HEADER LINKS ──────────────────────────────────────
|
||||
mkdir -p "$F/streaming/header"
|
||||
ln -sf ../../uncompressed/u1 "$F/streaming/header/h" # first alt‑setting
|
||||
mkdir -p "$F/control/header"
|
||||
ln -sf ../../streaming/header/h "$F/control/header/h" # tie to control IF
|
||||
ln -sf ../../uncompressed/u "$F/streaming/header/h"
|
||||
|
||||
# -- 3. Human‑readable string for the camera -----------------------
|
||||
mkdir -p "$F/control/header"
|
||||
ln -sf ../../streaming/header/h "$F/control/header/h"
|
||||
|
||||
# Friendly string
|
||||
mkdir -p "$F/control/header/strings/0x409"
|
||||
echo "Lesavka UVC" >"$F/control/header/strings/0x409/label"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user