Sha256: f66ffcdac433a4c88e930c5d0689790d0b860302daf6f584caff07305b5ce9b6

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

require 'camellia'
include Camellia

j=0
Thread.new do
    loop do
        sleep 0.01
        puts "#{j}..."
        j+=1
    end
end

# CamCapture2 is the original version from the C library
# It is not Ruby-threads compatible
image=CamImage.new
capture=CamCapture2.new(0)
for i in 1..10 do
    capture.capture image
    puts "Grabbed image #{i}...#{image.width}*#{image.height}"
end

# CamCapture is the Ruby specific version
# It is fully Ruby-threads compatible
capture=CamCapture.new(0)
puts "#{capture.width}*#{capture.height}"
image=CamImage.new
for i in 1..10 do
    capture.capture image
    puts "Grabbed image #{i}...#{image.width}*#{image.height}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
camellia-2.7.0-i386-mswin32 ext/test.rb
camellia-2.7.0-x86-linux ext/test.rb