dtas 0.14.0 → 0.14.2

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
  SHA1:
3
- metadata.gz: 6a8368223a46a5e0444391029757906680b7c542
4
- data.tar.gz: b5c51de31c4fcf739c16c177b07ed593897bf83a
3
+ metadata.gz: 0bc3ffcf67bb7f7e020a386299244ce66f10ad4d
4
+ data.tar.gz: 62e5cb485569bee19c6d68ca70fadf335585fc4d
5
5
  SHA512:
6
- metadata.gz: 712fb210c0b372c2f3d170345c84f62dce8bd694544c4bc06d04401b5be7eb6e39719d7ad59954f8b2d49aaa9fad24bf20f9b4462c255ece9f864c42fcea6ba3
7
- data.tar.gz: 694d7d60ff9d65a2cb23b6904821852f613fac748559930d6d889cfc7ebdcea4e75682237a2b19c092ec4bef30fe6e7b734f66daa0ed593b31d94d3328810d26
6
+ metadata.gz: 69ffea1179687f8bb6f73bdde76a6b9e1b7d47e39744f17398f392abf1d48b501ec4874b9b282e7143b0f02aa166e0910d3b4d3ca3935f0194d601d346f0fd5f
7
+ data.tar.gz: bd7f43ad66ba88d8c5d1ca2e0225a38d9a2c7125961bd19e1f74ccbbe44a5be9bd19f4540a8f386ef4f4f75da8c70a5c126fa29dd642130185ec37c53f76951d
@@ -5,7 +5,7 @@
5
5
  CONSTANT = "DTAS::VERSION"
6
6
  RVF = "lib/dtas/version.rb"
7
7
  GVF = "GIT-VERSION-FILE"
8
- DEF_VER = "v0.14.0"
8
+ DEF_VER = "v0.14.2"
9
9
  vn = DEF_VER
10
10
 
11
11
  # First see if there is a version file (included in release tarballs),
data/INSTALL CHANGED
@@ -39,10 +39,10 @@ For future upgrades of dtas (upgrades to dtas-linux will be infrequent)
39
39
 
40
40
  Grab the latest tarball from our HTTP site:
41
41
 
42
- http://dtas.80x24.org/2016/dtas-0.14.0.tar.gz
42
+ http://dtas.80x24.org/2016/dtas-0.14.2.tar.gz
43
43
 
44
- $ tar zxvf dtas-0.14.0.tar.gz
45
- $ cd dtas-0.14.0
44
+ $ tar zxvf dtas-0.14.2.tar.gz
45
+ $ cd dtas-0.14.2
46
46
  $ sudo ruby setup.rb
47
47
 
48
48
  GNU/Linux users may optionally install "io_splice" and
@@ -9,6 +9,8 @@
9
9
  unless RUBY_PLATFORM =~ /linux/
10
10
  warn "this relies on Linux /proc and probably does not work well for you"
11
11
  end
12
+ @ffprobe = 'ffprobe'
13
+ @avprobe = 'avprobe'
12
14
 
13
15
  require 'yaml'
14
16
  require 'io/wait'
@@ -97,8 +99,17 @@ def do_ra(fp, pos, w)
97
99
  len: '%.3f' % (len / (1024 * 1024.0)),
98
100
  pos: pos })
99
101
  spawn('soxi', path, @redir)
100
- spawn('avprobe', path, @redir)
101
- spawn('ffprobe', path, @redir)
102
+ begin
103
+ spawn(@avprobe, path, @redir)
104
+ rescue Errno::ENOENT
105
+ @avprobe = false unless File.exist?(path)
106
+ end if @avprobe
107
+ begin
108
+ spawn(@ffprobe, path, @redir)
109
+ rescue Errno::ENOENT
110
+ @ffprobe = false unless File.exist?(path)
111
+ end if @ffprobe
112
+
102
113
  fp.advise(:sequential, pos, len)
103
114
  Thread.new(fp.dup) { |d| d.advise(:willneed, pos, len); d.close }
104
115
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # used in various places for safe wakeups from IO.select via signals
6
6
  # A fallback for non-Linux systems lacking the "sleepy_penguin" RubyGem
7
- require_relative 'nonblock'
7
+ require_relative '../nonblock'
8
8
  class DTAS::Sigevent # :nodoc:
9
9
  attr_reader :to_io
10
10
 
@@ -78,28 +78,50 @@ def av_ff_ok?
78
78
  break if cmd == prev_cmd
79
79
 
80
80
  err = "".b
81
- s = qx(@env, cmd, err_str: err, no_raise: true)
81
+ begin
82
+ s = qx(@env, cmd, err_str: err, no_raise: true)
83
+ rescue Errno::ENOENT # avprobe/ffprobe not installed
84
+ return false
85
+ end
82
86
  return false unless probe_ok?(s, err)
83
- s.scan(%r{^\[STREAM\]\n(.*?)\n\[/STREAM\]\n}mn) do |_|
84
- __parse_astream(cmd, $1) do |index, as|
85
- # incomplete streams may have zero channels
86
- if as.channels > 0 && as.rate > 0
87
- @astreams[index] = as
88
- incomplete[index] = nil
89
- else
90
- incomplete[index] = as
87
+
88
+ # old avprobe
89
+ [ %r{^\[STREAM\]\n(.*?)\n\[/STREAM\]\n}mn,
90
+ %r{^\[streams\.stream\.\d+\]\n(.*?)\n\n}mn ].each do |re|
91
+ s.scan(re) do |_|
92
+ __parse_astream(cmd, $1) do |index, as|
93
+ # incomplete streams may have zero channels
94
+ if as.channels > 0 && as.rate > 0
95
+ @astreams[index] = as
96
+ incomplete[index] = nil
97
+ else
98
+ incomplete[index] = as
99
+ end
91
100
  end
92
101
  end
93
102
  end
103
+
94
104
  prev_cmd = cmd
95
105
  end while incomplete.compact[0]
96
106
 
107
+ # old avprobe
97
108
  s.scan(%r{^\[FORMAT\]\n(.*?)\n\[/FORMAT\]\n}m) do |_|
98
109
  f = $1.dup
99
110
  f =~ /^duration=([\d\.]+)\s*$/nm and @duration = $1.to_f
100
111
  # TODO: multi-line/multi-value/repeated tags
101
112
  f.gsub!(/^TAG:([^=]+)=(.*)$/ni) { |_| @comments[$1.upcase.freeze] = $2 }
102
113
  end
114
+
115
+ # new avprobe
116
+ s.scan(%r{^\[format\.tags\]\n(.*?)\n\n}m) do |_|
117
+ f = $1.dup
118
+ f.gsub!(/^([^=]+)=(.*)$/ni) { |_| @comments[$1.upcase.freeze] = $2 }
119
+ end
120
+ s.scan(%r{^\[format\]\n(.*?)\n\n}m) do |_|
121
+ f = $1.dup
122
+ f =~ /^duration=([\d\.]+)\s*$/nm and @duration = $1.to_f
123
+ end
124
+
103
125
  ! @astreams.compact.empty?
104
126
  end
105
127
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dtas hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-31 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Free Software command-line tools for audio playback, mastering, and
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  requirements: []
207
207
  rubyforge_project:
208
- rubygems_version: 2.5.1
208
+ rubygems_version: 2.5.2
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: duct tape audio suite for *nix