Skip to content

Commit

Permalink
Making the view target nicer.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Aug 19, 2015
1 parent 64c1bb2 commit 9f0c346
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -67,7 +67,7 @@ clean:
load: load-gateware load-lm32-firmware load-fx2-firmware

view:
guvcview --device=/dev/video0 --show_fps=1 --size=1024X768
./scripts/view.sh

all: gateware load-gateware load-fx2-firmware

Expand Down
28 changes: 28 additions & 0 deletions scripts/view.sh
@@ -0,0 +1,28 @@
#!/bin/sh

I=0
while true; do
echo
if ! v4l-info /dev/video$I > /dev/null 2>&1; then
echo "No /dev/video$I"
break
else
echo "/dev/video$I - exists!"
fi

if v4l-info /dev/video$I | grep 'HDMI2USB' > /dev/null 2>&1; then
echo "Device /dev/video$I *is* a HDMI2USB"
export HDMI2USB=/dev/video$I
break
else
echo "Device /dev/video$I is *not* a HDMI2USB"
fi

I=$((I+1))
done

WIDTH=1024
HEIGHT=768

mplayer tv:// -tv driver=v4l2:width=$WIDTH:height=$HEIGHT:device=$HDMI2USB -vo xv
#guvcview --device=$HDMI2USB --show_fps=1 --size=$WIDTHx$HEIGHT

0 comments on commit 9f0c346

Please sign in to comment.