Permalink
Browse files

Depending on hornetseye-frame version 1.0

  • Loading branch information...
1 parent f6b4c64 commit 7c2be501d1d31ffb3a4ba4da30c0b6af4b416f78 @wedesoft committed Aug 6, 2012
Showing with 43 additions and 2 deletions.
  1. +2 −2 Rakefile
  2. +3 −0 irb.sh
  3. +3 −0 prep.rb
  4. 0 rake.log
  5. +25 −0 rgb.rb
  6. +10 −0 test.rb
View
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
require 'rbconfig'
PKG_NAME = 'hornetseye-xorg'
-PKG_VERSION = '1.0.0'
+PKG_VERSION = '1.0.1'
CFG = RbConfig::CONFIG
CXX = ENV[ 'CXX' ] || 'g++'
RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -177,7 +177,7 @@ begin
s.rdoc_options = %w{--no-private}
s.add_dependency %<malloc>, [ '~> 1.1' ]
s.add_dependency %<multiarray>, [ '~> 1.0' ]
- s.add_dependency %<hornetseye-frame>, [ '~> 0.11' ]
+ s.add_dependency %<hornetseye-frame>, [ '~> 1.0' ]
end
GEM_BINARY = "#{PKG_NAME}-#{PKG_VERSION}-#{$BINSPEC.platform}.gem"
desc "Build the gem file #{GEM_SOURCE}"
View
3 irb.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+/usr/local/bin/irb1.9 -I. -Iext -Ilib -rprep $@
+
View
@@ -0,0 +1,3 @@
+require 'hornetseye_xorg'
+include Hornetseye
+
View
No changes.
View
25 rgb.rb
@@ -0,0 +1,25 @@
+#!/usr/bin/env ruby
+require 'rubygems'
+require 'hornetseye_xorg'
+require 'hornetseye_ffmpeg'
+include Hornetseye
+input = AVInput.new 'http://vision.eng.shu.ac.uk/jan/hornetseye2010.avi'
+dt = 1.0 / input.frame_rate
+width, height = input.width, input.height
+p width
+p height
+display = X11Display.new
+output = (0 ... 4).collect { XImageOutput.new }
+window = output.collect { |o| X11Window.new display, o, width, height }
+window.each { |w| w.show }
+t = Time.new.to_f
+while display.status?
+ img = input.read.to_ubytergb
+ output[0].write img
+ output[1].write img * RGB( 1, 0, 0 )
+ output[2].write img * RGB( 0, 1, 0 )
+ output[3].write img * RGB( 0, 0, 1 )
+ display.event_loop [ t + dt - Time.new.to_f, 0 ].max
+ t += dt
+end
+
View
10 test.rb
@@ -0,0 +1,10 @@
+#!/usr/bin/ruby
+#/usr/bin/ruby -Ilib -Iext -rrubygems -rhornetseye_xorg -rhornetseye_ffmpeg
+require 'rubygems'
+require 'hornetseye_xorg'
+require 'hornetseye_ffmpeg'
+include Hornetseye
+input = AVInput.new '/home/jan/Videos/V22.asf'
+X11Display.show( input.width, input.height, :title => 'V22', :output => XVideoOutput,
+ :frame_rate => input.frame_rate, :border => true ) { input.read }
+

0 comments on commit 7c2be50

Please sign in to comment.