libis-format 1.3.7 → 1.3.7.1
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 +4 -4
- data/lib/libis/format/converter/chain.rb +9 -0
- data/lib/libis/format/tool/ff_mpeg.rb +1 -1
- data/lib/libis/format/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d965e1a4bd413734b46ad2566ccc59fa98bf00fad85e4105367316171a1697d5
|
|
4
|
+
data.tar.gz: a49ed1bfd6cbc79a3874a3520fb9569c1bf7916c6c9d0b74ad137bef4017f52d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3951388c8f27465bf948887689a55a6132d7ccc9e8d51899d1644423a7c67c76719d71d1b2169cc1f9533ad9a5d0a55644226311cea2f0e98959638c9f11e8dc
|
|
7
|
+
data.tar.gz: 9b7ea1abc5e9bdadc6da474adf23a266a95e80a5e7f194a7e5f4733eae88f58e75586bfc222fca05c06d68bda62724e02847bea563749d5be0bd4262c6f2bc55
|
|
@@ -70,6 +70,7 @@ module Libis
|
|
|
70
70
|
|
|
71
71
|
# noinspection RubyParenthesesAroundConditionInspection
|
|
72
72
|
conversion_success = @converter_chain.each_with_index do |node, i|
|
|
73
|
+
debug "Converting with node #{node}"
|
|
73
74
|
target_type = node[:output]
|
|
74
75
|
converter_class = node[:converter]
|
|
75
76
|
converter = converter_class.new
|
|
@@ -78,6 +79,8 @@ module Libis
|
|
|
78
79
|
converter.send operation[:method], operation[:argument]
|
|
79
80
|
end
|
|
80
81
|
|
|
82
|
+
debug "Converter: #{converter.inspect}"
|
|
83
|
+
|
|
81
84
|
target = target_file
|
|
82
85
|
|
|
83
86
|
if i < size - 1
|
|
@@ -88,7 +91,9 @@ module Libis
|
|
|
88
91
|
|
|
89
92
|
FileUtils.mkdir_p File.dirname(target)
|
|
90
93
|
|
|
94
|
+
debug "Target file: #{target}"
|
|
91
95
|
r = converter.convert(src_file, target, target_type)
|
|
96
|
+
debug "Conversion result: #{r}"
|
|
92
97
|
|
|
93
98
|
src_file = r[:files].first
|
|
94
99
|
xtra_files += r[:files][1..]
|
|
@@ -99,8 +104,12 @@ module Libis
|
|
|
99
104
|
:success
|
|
100
105
|
end
|
|
101
106
|
|
|
107
|
+
debug "Final conversion result: #{conversion_success}"
|
|
108
|
+
|
|
102
109
|
result[:files] = [src_file] + xtra_files
|
|
103
110
|
|
|
111
|
+
debug "Final result: #{result}"
|
|
112
|
+
|
|
104
113
|
temp_files.each do |f|
|
|
105
114
|
FileUtils.rm(f, force: true)
|
|
106
115
|
end
|
|
@@ -40,7 +40,7 @@ module Libis
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
raise "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
|
|
43
|
-
raise "#{self.class} errors: #{result[:err].join("\n")}" unless
|
|
43
|
+
raise "#{self.class} errors: #{result[:err].join("\n")}" unless result[:status] == 0
|
|
44
44
|
|
|
45
45
|
warn "FFMpeg warnings: #{(result[:err] + result[:out]).join("\n")}" unless result[:err].empty?
|
|
46
46
|
|
data/lib/libis/format/version.rb
CHANGED