File: shot.rb

package info (click to toggle)
ruby-v4l 0.1.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 56 kB
  • ctags: 44
  • sloc: ansic: 491; ruby: 49; makefile: 48
file content (8 lines) | stat: -rw-r--r-- 203 bytes parent folder | download
1
2
3
4
5
6
7
8
require "V4l"

$v4l = V4l.new("/dev/video")
puts "Device: #{$v4l.name}"
puts "Size: #{$v4l.width}x#{$v4l.height}"
puts "Channel: #{$v4l.channels[$v4l.channel]}"
$v4l.get_frame
$v4l.write_file "shot.ppm"