aboutsummaryrefslogtreecommitdiffstats
path: root/dvb-t/se-Vaxbo
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2017-01-05 15:56:29 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2017-01-05 15:56:29 +0000
commitf1fbe1399e7a68b651b7c1563f13578c3cfea2c5 (patch)
treec0cafed2ae0bd2f637a257715f6022f32f229024 /dvb-t/se-Vaxbo
parente2c0d31c1a3ba08a43c5787b78e29e50e3903160 (diff)
parent0c34a5909320f924824d0402556780faba2127d1 (diff)
downloaddtv-scan-tables-f1fbe1399e7a68b651b7c1563f13578c3cfea2c5.tar.gz
Merge tag 'upstream/0+git20161227.ac7535a'
Upstream version 0+git20161227.ac7535a
Diffstat (limited to 'dvb-t/se-Vaxbo')
0 files changed, 0 insertions, 0 deletions
{ color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/perl

use strict;
use vars qw ($file $DELAY);
########## CONFIG
  $file = "lcd4linux"; # .png is appended
  $DELAY = 0;          # delay in seconds
                       # if delay is zero, file is sent when modified.
#################

use CGI qw/:push -nph/;
$| = 1;
my ($mtime, $nmtime, $size, $nsize);
(undef, undef, undef, undef, undef, undef, undef, $size, undef,
   $mtime) = stat "$file.png";
print multipart_init(-boundary=>'----------------here we go!');
while (1) {
  print multipart_start(-type=>'image/png');
  undef $/;
  open(IN, "$file.png") or die("Can't read '$file.png'");
  $_ = <IN>;
  print $_;
  close(IN);
  print multipart_end;
  if ($DELAY) {
    sleep $DELAY;
  }  
  else {
    W: while (1) {
  #    sleep(1);
      (undef, undef, undef, undef, undef, undef, undef, $nsize, undef,
         $nmtime) = stat "$file.png";
      if($mtime != $nmtime || $size != $nsize) {	 
        $mtime = $nmtime;
	$size = $nsize;
	last W;
      }	
    }	 
  }	
}