ipcam 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ipcam.gemspec +1 -1
- data/lib/ipcam/main.rb +3 -7
- data/lib/ipcam/version.rb +1 -1
- data/resource/ipcam/js/main.js +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6417acb08bb6a9f12d87c6415ac262af7b33abe45a13c861ba3f8285792d8346
|
4
|
+
data.tar.gz: e6c3d45e5e8ab073e8ed61518140636b69354f2767f31907f1913370e16d62c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e413a40ad853c87b4d51c9b572de699188a684c35d23bf3eee5eb64e938a284e5b065dde725bab3603984570e2fe51d0ba5787e35580482d7d6db5238cb30206
|
7
|
+
data.tar.gz: 7d9a455266293089e9fd757ee526c95587b6e33f1cdea00fb63f042064c921cbe5fb8698a84da348a14c32b543681bb01db0b10968dd1c0b21f5d5dfb76ab133
|
data/ipcam.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.add_development_dependency "bundler", "~> 2.0"
|
40
40
|
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
-
spec.add_dependency "v4l2-ruby", "~> 0.
|
41
|
+
spec.add_dependency "v4l2-ruby", "~> 0.10.0"
|
42
42
|
spec.add_dependency "puma", "~> 3.12.1"
|
43
43
|
spec.add_dependency "sinatra", "~> 2.0.5"
|
44
44
|
spec.add_dependency "sinatra-contrib", "~> 2.0.5"
|
data/lib/ipcam/main.rb
CHANGED
@@ -224,10 +224,10 @@ module IPCam
|
|
224
224
|
end
|
225
225
|
private :broadcast
|
226
226
|
|
227
|
-
def change_state(state)
|
227
|
+
def change_state(state, force = false)
|
228
228
|
flag = @mutex.try_lock
|
229
229
|
|
230
|
-
if @state != state
|
230
|
+
if @state != state or force
|
231
231
|
@state = state
|
232
232
|
broadcast(:change_state, state)
|
233
233
|
end
|
@@ -267,17 +267,13 @@ module IPCam
|
|
267
267
|
@camera.stop
|
268
268
|
retry
|
269
269
|
|
270
|
-
rescue => e
|
271
|
-
change_state(:ABORT)
|
272
|
-
raise(e)
|
273
|
-
|
274
270
|
ensure
|
275
271
|
@camera.stop if (@camera.busy? rescue false)
|
276
272
|
end
|
277
273
|
|
278
274
|
rescue => e
|
279
275
|
$logger.error("main") {"camera error occured (#{e.message})"}
|
280
|
-
change_state(:ABORT)
|
276
|
+
change_state(:ABORT, :force)
|
281
277
|
|
282
278
|
ensure
|
283
279
|
@camera&.close
|
data/lib/ipcam/version.rb
CHANGED
data/resource/ipcam/js/main.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipcam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hirosho Kuwagata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.10.0
|
48
48
|
type: :runtime
|
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: 0.
|
54
|
+
version: 0.10.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: puma
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|