forked from openbroadcaster/obplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobplayer_loop
executable file
·40 lines (32 loc) · 880 Bytes
/
obplayer_loop
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
#!/bin/bash
RESET=""
WAYLAND_VIDEO="false"
PRODUCT_NAME="$(cat /sys/class/dmi/id/product_name)"
BITS="$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')"
OBPLAYER_SUPPORTED="1"
if [ "$PRODUCT_NAME" != "Alice Key" ]; then
if [ "$BITS" == "64" ]; then
# For now we just go with 32 bit could be a pi. This should be updated in time.
OBPLAYER_SUPPORTED="0"
fi
fi
export OBPLAYER_SUPPORTED
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
while [ 1 ]
do
GDK_BACKEND=x11 ./obplayer_check $@ $RESET
if [ $? -eq 37 ]
then
echo "deleting data.db and restarting with -r"
#rm ~/.openbroadcaster/data.db
RESET="-r"
else
RESET=""
fi
if [ "$WAYLAND_VIDEO" == "true" ]; then
echo "Wayland not supported! Playing now running under X11 mode."
GDK_BACKEND=x11
fi
sleep 4
done