ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Video-Capture-V4l/examples/xsview
Revision: 1.1
Committed: Fri May 5 20:21:53 2000 UTC (26 years, 4 months ago) by pcg
Branch: MAIN
CVS Tags: rel-0_9, rel-0_902, HEAD
Log Message:
Initial check-in

File Contents

# User Rev Content
1 pcg 1.1 #!/usr/bin/perl
2    
3     use blib;
4     use Video::Capture::V4l;
5     use Video::RTjpeg;
6    
7     $outprefix = "/tmp/vstream";
8    
9     require $outprefix;
10    
11     $|=1;
12    
13     open DATA, "<$outprefix.v0" or die;
14    
15     read DATA, $buf, 4;
16     my ($tlen) = unpack "N*", $buf;
17    
18     read DATA, $tables, $tlen;
19     Video::RTjpeg::init_decompress($tables, $w, $h);
20    
21     while (read DATA, $buf, 8) {
22     my ($time, $size) = unpack "N*", $buf;
23     read DATA, $buf, $size;
24     $buf = Video::RTjpeg::decompress $buf;
25     $buf = Video::RTjpeg::yuvrgb $buf;
26     print ".$size";
27     #print ".",length($buf);
28     open DISPLAY, "| display -size ${w}x$h rgb:-" or die;
29     print DISPLAY $buf;
30     close DISPLAY;
31     }