rest-ftp-daemon 0.410.4 → 0.410.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be7b4ae68db6b95a7bc9752ad7ebbbd08dbaf826
4
- data.tar.gz: 45f205479d718def98f02d90bb2d6f42021106c5
3
+ metadata.gz: 0fa821b4974f3c450b6ba939b7d550056f567f61
4
+ data.tar.gz: 5e63689d2ef91e6a28046824086da73e1519f78f
5
5
  SHA512:
6
- metadata.gz: 2edcf302d49057d7fd0b443d340b273264d785232ab4df259e51fb3877a70f8fde480abe5aaf3e7282b79e59c3dd0edf77f679a3268e3f6e2467259270acafb7
7
- data.tar.gz: 43decf57d56dba500de038195f609877cb67eb920427d48adf57a870d9bf15d42ce984f3e1814a1dceb66254fe0eb88837f446e404ffdffe813bd73475c8cb36
6
+ metadata.gz: 38976cb5fbdd2ba3adafc8423eec17b2db16c9b022ad53b7c34ce3b57cf2f936a26b328e7abdbb6483a337597d852b35e3f94a5aef5c1587391856db6eda7ba8
7
+ data.tar.gz: 63cf9c1429b5ac2ffcbb7a0a3a7160de6e1ebedbc74505b399e4d437ee30fe323cd9533c7cb1933aff649a4fbb9576d0652da710df511a74a9a8f0cbb377f653
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rest-ftp-daemon (0.410.4)
4
+ rest-ftp-daemon (0.410.5)
5
5
  activesupport (~> 4.2)
6
6
  api-auth
7
7
  bmc-daemon-lib (~> 0.3.4)
@@ -13,7 +13,7 @@ JOB_RANDOM_LEN = 8
13
13
  JOB_IDENT_LEN = 4
14
14
  JOB_TEMPFILE_LEN = 8
15
15
  JOB_UPDATE_INTERVAL = 1
16
-
16
+ JOB_FFMPEG_THREADS = 2
17
17
 
18
18
  # Constants: logger
19
19
  LOG_ROTATION = "daily"
@@ -61,10 +61,13 @@ module RestFtpDaemon
61
61
  movie = FFMPEG::Movie.new(source.path)
62
62
 
63
63
  # Build options
64
- options = {}
65
- options[:audio_codec] = @video_ac unless @video_ac.to_s.empty?
66
- options[:video_codec] = @video_vc unless @video_vc.to_s.empty?
67
- options[:custom] = @ffmpeg_custom_option_array if @ffmpeg_custom_option_array
64
+ options = {
65
+ threads: JOB_FFMPEG_THREADS
66
+ }
67
+ options[:audio_codec] = @video_ac unless @video_ac.to_s.empty?
68
+ options[:video_codec] = @video_vc unless @video_vc.to_s.empty?
69
+ options[:custom] = options_from(@video_custom) if @video_custom.is_a? Hash
70
+
68
71
  set_info :work, :ffmpeg_options, options
69
72
 
70
73
  # Announce contexte
@@ -81,14 +84,14 @@ module RestFtpDaemon
81
84
  end
82
85
  end
83
86
 
84
- def ffmpeg_custom_option_array
87
+ def options_from attributes
85
88
  # Ensure options ar in the correct format
86
- return [] unless @video_custom.is_a? Hash
89
+ return [] unless attributes.is_a? Hash
87
90
  # video_custom_parts = @video_custom.to_s.scan(/(?:\w|"[^"]*")+/)
88
91
 
89
92
  # Build the final array
90
93
  custom_parts = []
91
- @video_custom.each do |name, value|
94
+ attributes.each do |name, value|
92
95
  custom_parts << "-#{name}"
93
96
  custom_parts << value.to_s
94
97
  end
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |spec|
3
3
 
4
4
  # Project version
5
- spec.version = "0.410.4"
5
+ spec.version = "0.410.5"
6
6
 
7
7
  # Project description
8
8
  spec.name = "rest-ftp-daemon"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-ftp-daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.410.4
4
+ version: 0.410.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI