/[mplayer-eee-tv]/record-stream.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /record-stream.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Wed Oct 28 19:18:52 2009 UTC revision 13 by dpavlin, Thu Oct 29 11:55:14 2009 UTC
# Line 4  Line 4 
4    
5  adapter=$1  adapter=$1
6  channel=$2  channel=$2
7  time=$3  duration=$3
8    
9  if [ -z "$adapter" -o -z "$channel" -o -z "$time" ] ; then  if [ -z "$adapter" -o -z "$channel" -o -z "$time" ] ; then
10          echo "Usage: $0 adapter_nr Channel_name duration"          echo "Usage: $0 adapter_nr Channel_name duration"
11          exit 1;          exit 1;
12  fi  fi
13    
14  dir=/mnt/usb/  dir=/mnt/tv/
15  uid=`date +%Y-%m-%d_%H:%M:%S`  uid=`date +%Y-%m-%d_%H:%M:%S`
16  file=$dir/$uid-$channel.ts  file=$dir/$uid-$channel.ts
17    
# Line 29  STREAM_PID=$! Line 29  STREAM_PID=$!
29  trap "kill $TZAP_PID $STREAM_PID" 1 2 15  trap "kill $TZAP_PID $STREAM_PID" 1 2 15
30    
31  # Set duration of recording after converting minutes to seconds  # Set duration of recording after converting minutes to seconds
32  DURATION=$(($time*60))  echo "record $duration s"
33  echo "record $DURATION s"  sleep $duration
 sleep $DURATION  
34    
35  kill $TZAP_PID  kill $TZAP_PID
36  kill $STREAM_PID  kill $STREAM_PID

Legend:
Removed from v.9  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.26