<commit_before>From 1f90341236b8689d861b2ec28f0b770cf2ab857d Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Mon, 11 May 2015 14:05:48 +0200
Subject: [PATCH] manually launch gstreamer if /dev/fb1 is missing

Signed-off-by: <NAME> <<EMAIL>>
---
 Atmel-Video-Player.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Atmel-Video-Player.sh b/Atmel-Video-Player.sh
index f8c9213..602adb9 100755
--- a/Atmel-Video-Player.sh
+++ b/Atmel-Video-Player.sh
@@ -1,9 +1,14 @@
 #!/bin/sh
 
-sleep 2
-dd if=/dev/zero of=/dev/fb0
+if [ -e /dev/fb1 ]
+then
+	sleep 2
+	dd if=/dev/zero of=/dev/fb0
 
-cd "$(dirname "$0")"
-./player -platform linuxfb:fb=/dev/fb1 -plugin tslib:/dev/input/event1 -plugin evdevkeyboard:/dev/input/event0 $1
+	cd "$(dirname "$0")"
+	./player -platform linuxfb:fb=/dev/fb1 -plugin tslib:/dev/input/event1 -plugin evdevkeyboard:/dev/input/event0 $1
 
-dd if=/dev/zero of=/dev/fb1
+	dd if=/dev/zero of=/dev/fb1
+else
+	gst-launch-1.0 uridecodebin uri=file:///opt/VideoPlayer/media/Tech_on_Tour-Atmel_Visits_Washington_DC.mp4 expose-all-streams=false name=srcVideo caps="video/x-h264\;audio/x-raw" srcVideo. ! h264parse ! queue ! g1h264dec ! video/x-raw,width=800,height=480 ! progressreport silent=true do-query=true update-freq=1 format=time name=progress ! perf name=perf ! g1fbdevsink zero-memcpy=true max-lateness=-1 async=false enable-last-sample=false srcVideo. ! queue ! audioconvert ! audio/x-raw,format=S16LE ! volume volume=0.3 name=volume ! alsasink async=false enable-last-sample=false
+fi
-- 
1.9.1<commit_msg>videoplayer: handle the case if no alsa playback available<commit_after>From 1f90341236b8689d861b2ec28f0b770cf2ab857d Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Mon, 11 May 2015 14:05:48 +0200
Subject: [PATCH] manually launch gstreamer if /dev/fb1 is missing

Signed-off-by: <NAME> <<EMAIL>>
---
 Atmel-Video-Player.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Atmel-Video-Player.sh b/Atmel-Video-Player.sh
index f8c9213..602adb9 100755
--- a/Atmel-Video-Player.sh
+++ b/Atmel-Video-Player.sh
@@ -1,9 +1,19 @@
 #!/bin/sh
 
-sleep 2
-dd if=/dev/zero of=/dev/fb0
+if [ -e /dev/fb1 ]
+then
+	sleep 2
+	dd if=/dev/zero of=/dev/fb0
 
-cd "$(dirname "$0")"
-./player -platform linuxfb:fb=/dev/fb1 -plugin tslib:/dev/input/event1 -plugin evdevkeyboard:/dev/input/event0 $1
+	cd "$(dirname "$0")"
+	./player -platform linuxfb:fb=/dev/fb1 -plugin tslib:/dev/input/event1 -plugin evdevkeyboard:/dev/input/event0 $1
 
-dd if=/dev/zero of=/dev/fb1
+	dd if=/dev/zero of=/dev/fb1
+else
+	if [ -d /proc/asound/card0 ]
+	then
+		gst-launch-1.0 uridecodebin uri=file:///opt/VideoPlayer/media/Tech_on_Tour-Atmel_Visits_Washington_DC.mp4 expose-all-streams=false name=srcVideo caps="video/x-h264\;audio/x-raw" srcVideo. ! h264parse ! queue ! g1h264dec ! video/x-raw,width=800,height=480 ! progressreport silent=true do-query=true update-freq=1 format=time name=progress ! perf name=perf ! g1fbdevsink zero-memcpy=true max-lateness=-1 async=false enable-last-sample=false srcVideo. ! queue ! audioconvert ! audio/x-raw,format=S16LE ! volume volume=0.3 name=volume ! alsasink async=false enable-last-sample=false
+	else
+		gst-launch-1.0 uridecodebin uri=file:///opt/VideoPlayer/media/Tech_on_Tour-Atmel_Visits_Washington_DC.mp4 expose-all-streams=false name=srcVideo caps="video/x-h264" srcVideo. ! h264parse ! queue ! g1h264dec ! video/x-raw,width=800,height=480 ! progressreport silent=true do-query=true update-freq=1 format=time name=progress ! perf name=perf ! g1fbdevsink zero-memcpy=true max-lateness=-1 async=false enable-last-sample=false
+	fi
+fi
-- 
1.9.1
{'fraction_non_alphanumeric': 0.16625850340136056, 'fraction_numerical': 0.07591836734693877, 'mean_word_length': 4.405882352941177, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2557073', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1431, 'n_words': 295}