[xiph-cvs] cvs commit: snatch Snatch
Monty
xiphmont at xiph.org
Fri Apr 12 17:51:19 PDT 2002
xiphmont 02/04/12 17:51:19
Modified: . Snatch
Log:
fix some cases where a timeout doesn't restart record when it should
Revision Changes Path
1.8 +14 -7 snatch/Snatch
Index: Snatch
===================================================================
RCS file: /usr/local/cvsroot/snatch/Snatch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Snatch 2002/03/09 22:25:20 1.7
+++ Snatch 2002/04/13 00:51:18 1.8
@@ -15,7 +15,7 @@
exit 1;
}
-$version="Snatch 20020308";
+$version="Snatch 20020412";
$configdir=$HOME."/.snatch";
$configfile=$configdir."/config.txt";
$historyfile=$configdir."/history.txt";
@@ -560,9 +560,9 @@
}
sub Robot_Stop{
- $last_timer_event=time();
my $stopcode=join "",("Ks",pack ("S",4));
syswrite COMM_SOCK,$stopcode;
+ $recording_pending=0;
}
sub Robot_Exit{
@@ -572,7 +572,6 @@
}
sub Robot_Active{
- $last_timer_event=0;
$next_timer_event=0;
if(defined($timer_callback) && !recording_active){
$timer_callback->cancel();
@@ -594,7 +593,6 @@
}
sub Robot_Inactive{
- $last_timer_event=0;
$next_timer_event=0;
if(defined($timer_callback)){
$timer_callback->cancel();
@@ -615,7 +613,6 @@
}
sub Robot_Timer{
- $last_timer_event=0;
$next_timer_event=0;
send_string("O","");
send_string("L","");
@@ -635,7 +632,6 @@
$password,$outfile,$url)=SplitTimerEntry($line);
$recording_pending=1;
- $last_timer_event=$start;
$next_timer_event=$start+$duration-1; # the -1 is important; makes sure contiguous
# but nonoverlapping events don't interfere
@@ -663,7 +659,7 @@
my$start=shift @TIMETEMP;
my$end=shift @ENDTIMETEMP;
- if($start>$last_timer_event && $start<=$now && $end>$now){
+ if($start<=$now && $end>$now){
Robot_Stop();
DoTimedEntry($start,$line);
return;
@@ -681,15 +677,21 @@
if($mode=~/timer/){
my$now=time();
+ print "mode=timer\n";
+
if($TIMER_ENDTIMES[$TIMER_SORTED[$#TIMER]]<$now){
+ print "stopping\n";
Robot_Stop();
Robot_Inactive();
ButtonConfig();
}else{
if($now>=$next_timer_event){
+ print "setting up\n";
SetupTimerDispatch();
}else{
+ print "recording\n";
+
my$waiting_seconds=$next_timer_event-$now;
my$waiting_minutes=int($waiting_seconds/60);
@@ -1074,6 +1076,11 @@
if($line=~/Capture stopped/){
$recording_active=0;
$recording_pending=0;
+
+ if($mode=~/timer/){
+ SetupTimerDispatch();
+ }
+
}
if($line=~/Capturing/){
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list