diff options
| author | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 | 
|---|---|---|
| committer | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 | 
| commit | e1265fa32837f457ee2c2fa259d12c9545af4bbf (patch) | |
| tree | 64b8d5f1c81c14f019047b0cb00cb77c2dcecf55 /tests/debug | |
| parent | a37beb44d59cca329d0d9345c21505af81030688 (diff) | |
| download | ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.gz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.bz2 ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.xz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.zip | |
First stand-alone ipecamera implementation
Diffstat (limited to 'tests/debug')
| -rwxr-xr-x | tests/debug/incomplete.sh | 38 | 
1 files changed, 38 insertions, 0 deletions
| diff --git a/tests/debug/incomplete.sh b/tests/debug/incomplete.sh new file mode 100755 index 0000000..090e638 --- /dev/null +++ b/tests/debug/incomplete.sh @@ -0,0 +1,38 @@ +#! /bin/bash + +function pci { +    PCILIB_PATH=`which pci` +    #LD_LIBRARY_PATH="$PCILIB_PATH"  +    $PCILIB_PATH/pci $* +} + +rm -f images.raw +touch images.raw + +echo "Starting the grabber" +pci --stop-dma +pci --start-dma dma1 +pci -g -o images.raw --run-time 1000000000 & +pid=$! + +usleep 1000000 + +for i in `seq 1 100000`; do +    old_size=`ls -la images.raw | cut -d " " -f 5` +    echo "Trigger $i" +    pci --trigger +    usleep 100000 +    new_size=`ls -la images.raw | cut -d " " -f 5` +    if [ $old_size -eq $new_size ]; then +	sleep 2 +	new_size=`ls -la images.raw | cut -d " " -f 5` +	if [ $old_size -eq $new_size ]; then +	    echo "Incomplete frame..." +	    killall -SIGINT pci +	    break +	fi +    fi +done + +echo "Waiting grabber to finish" +wait $pid | 
