diff options
-rwxr-xr-x | scripts/uvc-gadget.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/uvc-gadget.sh b/scripts/uvc-gadget.sh index daf85c2..8e4b6d5 100755 --- a/scripts/uvc-gadget.sh +++ b/scripts/uvc-gadget.sh @@ -87,13 +87,15 @@ delete_msd() { create_frame() { # Example usage: - # create_frame <function name> <width> <height> + # create_frame <function name> <width> <height> <format> <name> FUNCTION=$1 WIDTH=$2 HEIGHT=$3 + FORMAT=$4 + NAME=$5 - wdir=functions/$FUNCTION/streaming/uncompressed/u/${HEIGHT}p + wdir=functions/$FUNCTION/streaming/$FORMAT/$NAME/${HEIGHT}p mkdir -p $wdir echo $WIDTH > $wdir/wWidth @@ -116,13 +118,15 @@ create_uvc() { echo " Creating UVC gadget functionality : $FUNCTION" mkdir functions/$FUNCTION - create_frame $FUNCTION 640 360 - create_frame $FUNCTION 1280 720 - create_frame $FUNCTION 320 180 + create_frame $FUNCTION 640 360 uncompressed u + create_frame $FUNCTION 1280 720 uncompressed u + create_frame $FUNCTION 320 180 uncompressed u + create_frame $FUNCTION 1920 1080 mjpeg m mkdir functions/$FUNCTION/streaming/header/h cd functions/$FUNCTION/streaming/header/h ln -s ../../uncompressed/u + ln -s ../../mjpeg/m cd ../../class/fs ln -s ../../header/h cd ../../class/hs @@ -156,6 +160,8 @@ delete_uvc() { rm functions/$FUNCTION/streaming/header/h/u rmdir functions/$FUNCTION/streaming/uncompressed/u/*/ rmdir functions/$FUNCTION/streaming/uncompressed/u + rm -rf functions/$FUNCTION/streaming/mjpeg/m/*/ + rm -rf functions/$FUNCTION/streaming/mjpeg/m rmdir functions/$FUNCTION/streaming/header/h rmdir functions/$FUNCTION/control/header/h rmdir functions/$FUNCTION |