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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3673112cdc6871dd10631f4a67f4f5e1c93b3f6056af3acd6fbee4ef1ca3a8f8
4
- data.tar.gz: 119f2126a4a68f850285af9f8fe06e32e08324ff4e17b1939ba0e7ad2f818122
3
+ metadata.gz: 6417acb08bb6a9f12d87c6415ac262af7b33abe45a13c861ba3f8285792d8346
4
+ data.tar.gz: e6c3d45e5e8ab073e8ed61518140636b69354f2767f31907f1913370e16d62c8
5
5
  SHA512:
6
- metadata.gz: 63874cacbf9f2b194b4829a168067b976b3f6692cdf2b1fdc807b1fe66ca1863af4f43857a6b0a89a606af4d050ddb2372a79c21da859a990ba1407951651096
7
- data.tar.gz: 871dbee9300615fea6fd5b98e0053f0afe1e5311a1cfe615548a6ed189b45ac4b66d0e8f31d1a1d5dd15c595d8ff5489a1182e36ee7d6b4a4a5353cb1f8390aa
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.9.2"
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
@@ -1,3 +1,3 @@
1
1
  module IPCam
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -444,6 +444,8 @@
444
444
  $('select#image-size > option').remove();
445
445
  $('select#framerate > option').remove();
446
446
  $('div#controls').empty();
447
+
448
+ clearPreviewCanvas();
447
449
  }
448
450
 
449
451
  $('button#action').prop('disabled', false);
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.2
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-13 00:00:00.000000000 Z
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.9.2
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.9.2
54
+ version: 0.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: puma
57
57
  requirement: !ruby/object:Gem::Requirement