v4l2-ruby 0.9.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,67 @@
1
+ #! /usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ require 'test/unit'
5
+ require 'v4l2'
6
+
7
+ Warning[:experimental] = false
8
+
9
+ using TestUtil
10
+
11
+ class TestRactor < Test::Unit::TestCase
12
+ class << self
13
+ def startup
14
+ end
15
+
16
+ def shutdown
17
+ end
18
+ end
19
+
20
+ def setup
21
+ end
22
+
23
+ def teardown
24
+ end
25
+
26
+ test "using Ractor" do
27
+ r = Ractor.new(Config.device) { |device|
28
+ begin
29
+ cam = Video4Linux2::Camera.open(device)
30
+
31
+ cam.image_width = 640
32
+ cam.image_height = 480
33
+ cam.framerate = 5/1r
34
+ cam.format = :MJPG
35
+
36
+ cam.start {
37
+ 10.times {
38
+ Ractor.yield(cam.capture)
39
+ }
40
+ }
41
+
42
+ ensure
43
+ cam&.close if defined? cam
44
+ end
45
+
46
+ :END
47
+ }
48
+
49
+ assert_nothing_raised {
50
+ loop {
51
+ data = r.take
52
+ break if data == :END
53
+
54
+ p data.bytesize if Config.show_data?
55
+ }
56
+ }
57
+ end
58
+
59
+ test "unshareble" do
60
+ cam = assert_nothing_raised {klass.open(Config.device)}
61
+
62
+ assert_false(Ractor.shareable?(cam))
63
+
64
+ ensure
65
+ cam&.close if defined? cam
66
+ end
67
+ end
data/v4l2-ruby.gemspec CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.required_ruby_version = ">= 2.4.0"
38
38
 
39
- spec.add_development_dependency "bundler", "~> 1.17"
40
- spec.add_development_dependency "rake", "~> 10.0"
41
- spec.add_development_dependency "rake-compiler", "~> 1.0.7"
39
+ spec.add_development_dependency "bundler", ">= 2.3"
40
+ spec.add_development_dependency "rake", ">= 13.0"
41
+ spec.add_development_dependency "rake-compiler", "~> 1.1.0"
42
42
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: v4l2-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Kuwagata
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-10 00:00:00.000000000 Z
11
+ date: 2022-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '2.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.7
47
+ version: 1.1.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.7
54
+ version: 1.1.0
55
55
  description: V4L2 insterface library for ruby
56
56
  email:
57
57
  - kgt9221@gmail.com
@@ -60,6 +60,7 @@ extensions:
60
60
  - ext/v4l2/extconf.rb
61
61
  extra_rdoc_files: []
62
62
  files:
63
+ - ".gitignore"
63
64
  - Gemfile
64
65
  - LICENSE
65
66
  - README.md
@@ -70,13 +71,32 @@ files:
70
71
  - ext/v4l2/v4l2.c
71
72
  - lib/v4l2.rb
72
73
  - lib/v4l2/version.rb
74
+ - pkg/.gitkeep
75
+ - tests/config.yml
76
+ - tests/lib/config.rb
77
+ - tests/lib/test_util.rb
78
+ - tests/run_unit.rb
79
+ - tests/template.rb
80
+ - tests/unit/capture/test_start.rb
81
+ - tests/unit/config/test_set_format.rb
82
+ - tests/unit/config/test_set_framerate.rb
83
+ - tests/unit/config/test_set_image_size.rb
84
+ - tests/unit/create_object/test_simple_create.rb
85
+ - tests/unit/device_info/.test_get_bus_name.rb.swp
86
+ - tests/unit/device_info/test_get_bus_name.rb
87
+ - tests/unit/device_info/test_get_controls.rb
88
+ - tests/unit/device_info/test_get_device_name.rb
89
+ - tests/unit/device_info/test_get_driver_name.rb
90
+ - tests/unit/device_info/test_get_formats.rb
91
+ - tests/unit/device_info/test_get_framecap.rb
92
+ - tests/unit/ractor/test_ractor.rb
73
93
  - v4l2-ruby.gemspec
74
94
  homepage: https://github.com/kwgt/v4l2-ruby
75
95
  licenses:
76
96
  - MIT
77
97
  metadata:
78
98
  homepage_uri: https://github.com/kwgt/v4l2-ruby
79
- post_install_message:
99
+ post_install_message:
80
100
  rdoc_options: []
81
101
  require_paths:
82
102
  - lib
@@ -91,8 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
111
  - !ruby/object:Gem::Version
92
112
  version: '0'
93
113
  requirements: []
94
- rubygems_version: 3.0.3
95
- signing_key:
114
+ rubygems_version: 3.3.7
115
+ signing_key:
96
116
  specification_version: 4
97
117
  summary: V4L2 insterface library for ruby
98
118
  test_files: []