File: mkdv4lstart

package info (click to toggle)
dv4l 1.0-6
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 568 kB
  • sloc: ansic: 7,541; makefile: 320; sh: 260
file content (81 lines) | stat: -rwxr-xr-x 1,791 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh

cat > dv4lstart << EOF
#!/bin/sh
# export LD_DEBUG=bindings
# export DV4L_VERBOSE=3
export LD_PRELOAD="$1/libdv4l.so" 
export LD_PRELOAD

usage () {
    echo "Usage: dv4lstart [-c] [-v <level>] command [command options]"
    echo
    echo "Version " $2
    echo
    echo "    -c, --color-correction"
    echo "        Set this option if red objects look blue."
    echo
    echo "    -n, --new-dev"
    echo "        Tell dv4lstart to simulate a new video device rather"
    echo "        than overriding /dev/video0. Set this option if your"
    echo "        application needs to access other video devices."
    echo
    echo "    -r, --rgb-only"
    echo "        Set  this  option  to prevent V4L applications from"
    echo "        choosing YUV palettes. Try this option if you get low"
    echo "        frame rates."
    echo
    echo "    -w, --width"
    echo "        Set window width."
    echo
    echo "    -h, --height"
    echo "        Set window height."
    echo
    echo "    -v, --verbose <level>"
    echo "        Set the amount of debugging messages. A level of 0 means no"
    echo "        output at all, 1 is the default, 3 enables all messages."
}


while [ "\$#" -gt "0" ]
do
    case \$1 in
    -c | --color-correction)
        DV4L_COLORCORR=1
        export DV4L_COLORCORR
        ;;
    -n | --new-dev)
	DV4L_NEWDEV=1
	export DV4L_NEWDEV
	;;
    -r | --rgb-only)
	DV4L_RGBONLY=1
	export DV4L_RGBONLY
	;;
	-w | --width)
	shift
	DV4L_WIDTH=\$1
	export DV4L_WIDTH
	;;
	-h | --height)
	shift
	DV4L_HEIGHT=\$1
	export DV4L_HEIGHT
	;;
    -v | --verbose)
        shift
        DV4L_VERBOSE=\$1
        export DV4L_VERBOSE
        ;;
    -h | --help)
	usage
	exit 1
	;;
    *)
        exec \$*
        ;;
    esac
    shift
done
EOF
chmod 755 dv4lstart