hornetseye-v4l2 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -5
- data/ext/init.cc +1 -1
- data/lib/hornetseye-v4l2/v4l2input.rb +5 -10
- metadata +8 -8
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
|
|
7
7
|
require 'rbconfig'
|
8
8
|
|
9
9
|
PKG_NAME = 'hornetseye-v4l2'
|
10
|
-
PKG_VERSION = '0.
|
10
|
+
PKG_VERSION = '0.4.0'
|
11
11
|
CFG = RbConfig::CONFIG
|
12
12
|
CXX = ENV[ 'CXX' ] || 'g++'
|
13
13
|
RB_FILES = FileList[ 'lib/**/*.rb' ]
|
@@ -114,8 +114,8 @@ begin
|
|
114
114
|
s.extra_rdoc_files = []
|
115
115
|
s.rdoc_options = %w{--no-private}
|
116
116
|
s.add_dependency %<malloc>, [ '~> 1.1' ]
|
117
|
-
s.add_dependency %<multiarray>, [ '~> 0.
|
118
|
-
s.add_dependency %<hornetseye-frame>, [ '~> 0.
|
117
|
+
s.add_dependency %<multiarray>, [ '~> 0.23' ]
|
118
|
+
s.add_dependency %<hornetseye-frame>, [ '~> 0.11' ]
|
119
119
|
s.add_development_dependency %q{rake}
|
120
120
|
end
|
121
121
|
GEM_SOURCE = "#{PKG_NAME}-#{PKG_VERSION}.gem"
|
@@ -137,8 +137,8 @@ begin
|
|
137
137
|
s.extra_rdoc_files = []
|
138
138
|
s.rdoc_options = %w{--no-private}
|
139
139
|
s.add_dependency %<malloc>, [ '~> 1.1' ]
|
140
|
-
s.add_dependency %<multiarray>, [ '~> 0.
|
141
|
-
s.add_dependency %<hornetseye-frame>, [ '~> 0.
|
140
|
+
s.add_dependency %<multiarray>, [ '~> 0.23' ]
|
141
|
+
s.add_dependency %<hornetseye-frame>, [ '~> 0.11' ]
|
142
142
|
end
|
143
143
|
GEM_BINARY = "#{PKG_NAME}-#{PKG_VERSION}-#{$BINSPEC.platform}.gem"
|
144
144
|
desc "Build the gem file #{GEM_SOURCE}"
|
data/ext/init.cc
CHANGED
@@ -30,7 +30,7 @@ extern "C" {
|
|
30
30
|
|
31
31
|
void Init_hornetseye_v4l2(void)
|
32
32
|
{
|
33
|
-
|
33
|
+
rb_eval_string( "require 'hornetseye_frame'" );
|
34
34
|
VALUE rbHornetseye = rb_define_module( "Hornetseye" );
|
35
35
|
V4L2Input::registerRubyClass( rbHornetseye );
|
36
36
|
rb_require( "hornetseye_v4l2_ext.rb" );
|
@@ -50,24 +50,19 @@ module Hornetseye
|
|
50
50
|
MODE_GREY => UBYTE,
|
51
51
|
MODE_RGB24 => UBYTERGB,
|
52
52
|
MODE_BGR24 => BGR }
|
53
|
-
frame_types = []
|
54
|
-
|
55
|
-
target = map[mode.first]
|
56
|
-
if target
|
57
|
-
frame_types.push Hornetseye::Frame(target, *mode[1 .. 2])
|
58
|
-
end
|
59
|
-
end
|
53
|
+
frame_types = modes.collect { |mode| [map[mode.first], *mode[1 .. 2]] }.
|
54
|
+
select { |mode| mode.first }
|
60
55
|
if action
|
61
56
|
desired = action.call frame_types
|
62
57
|
else
|
63
58
|
preference = [I420, UYVY, YUY2, UBYTERGB, BGR, UBYTE]
|
64
59
|
desired = frame_types.sort_by do |mode|
|
65
|
-
[
|
60
|
+
[-preference.index(mode.first), mode[1] * mode[2]]
|
66
61
|
end.last
|
67
62
|
end
|
68
|
-
mode = map.invert[desired
|
63
|
+
mode = map.invert[desired[0]]
|
69
64
|
raise "Video mode #{desired.typecode} not supported" unless mode
|
70
|
-
[mode, desired
|
65
|
+
[mode, desired[1], desired[2]]
|
71
66
|
end
|
72
67
|
end
|
73
68
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
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: 2011-06-
|
17
|
+
date: 2011-06-29 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -41,8 +41,8 @@ dependencies:
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
segments:
|
43
43
|
- 0
|
44
|
-
-
|
45
|
-
version: "0.
|
44
|
+
- 23
|
45
|
+
version: "0.23"
|
46
46
|
type: :runtime
|
47
47
|
version_requirements: *id002
|
48
48
|
- !ruby/object:Gem::Dependency
|
@@ -55,8 +55,8 @@ dependencies:
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
segments:
|
57
57
|
- 0
|
58
|
-
-
|
59
|
-
version: "0.
|
58
|
+
- 11
|
59
|
+
version: "0.11"
|
60
60
|
type: :runtime
|
61
61
|
version_requirements: *id003
|
62
62
|
- !ruby/object:Gem::Dependency
|