forked from JeffCost/pwomxplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathomxplayer
executable file
·42 lines (31 loc) · 876 Bytes
/
omxplayer
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
#!/bin/sh
#mount -t nfs -o rsize=32768,wsize=32768,intr 192.168.10.1:/data/video /media
thisdir=`dirname $0`
OMXPLAYER="$thisdir/omxplayer.bin"
FBSET="/usr/sbin/fbset"
FONT="fonts/FreeSans.ttf"
if [ -e /usr/share/fonts/truetype/freefont/FreeSans.ttf ]; then
FONT="/usr/share/fonts/truetype/freefont/FreeSans.ttf"
else
FONT="$thisdir/fonts/FreeSans.ttf"
fi
if [ -e "$thisdir/ffmpeg_compiled" ]; then
export LD_LIBRARY_PATH="$thisdir/ffmpeg_compiled/usr/local/lib:/opt/vc/lib:$LD_LIBRARY_PATH"
else
export LD_LIBRARY_PATH=/opt/vc/lib:/usr/lib/omxplayer:$LD_LIBRARY_PATH
fi
XRES=1920
YRES=1080
XRES=1600
YRES=900
if [ -e $FBSET ]; then
echo 0 > /sys/class/vtconsole/vtcon1/bind
fbset -xres 1 -yres 1
fi
$OMXPLAYER --font $FONT "$@"
rc=$?
if [ -e $FBSET ]; then
fbset -xres ${XRES} -yres ${YRES}
echo 1 > /sys/class/vtconsole/vtcon1/bind
fi
exit $rc