hornetseye-dc1394 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
7
7
  require 'rbconfig'
8
8
 
9
9
  PKG_NAME = 'hornetseye-dc1394'
10
- PKG_VERSION = '0.3.1'
10
+ PKG_VERSION = '0.3.2'
11
11
  CFG = RbConfig::CONFIG
12
12
  CXX = ENV[ 'CXX' ] || 'g++'
13
13
  RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -42,9 +42,16 @@ module Hornetseye
42
42
  index.push i
43
43
  end
44
44
  end
45
- desired = action.call frame_types
45
+ if action
46
+ desired = action.call frame_types
47
+ else
48
+ preference = [ UYVY, UBYTERGB, USINT, UBYTE ]
49
+ desired = frame_types.sort_by do |mode|
50
+ [ -preference.index( mode.typecode ), mode.width * mode.height ]
51
+ end.last
52
+ end
46
53
  unless frame_types.member? desired
47
- raise "Frame type #{desired} not supported by camera"
54
+ raise "Frame type #{desired.inspect} not supported by camera"
48
55
  end
49
56
  index[ frame_types.index( desired ) ]
50
57
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-20 00:00:00 +00:00
17
+ date: 2010-11-21 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency