easy_mplayer 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{easy_mplayer}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brent Sanders"]
@@ -85,7 +85,7 @@ class MPlayer
85
85
 
86
86
  callback :file_error do
87
87
  warn "File error!"
88
- stop!
88
+ stop
89
89
  end
90
90
 
91
91
  callback :startup do
@@ -116,6 +116,13 @@ class MPlayer
116
116
  def path=(val)
117
117
  @opts[:path] = val
118
118
  end
119
+
120
+ # takes a block, that should return the X11 window_id of a window
121
+ # that mplayer can use as a render target. This will cause mplayer
122
+ # to embed its output into that window, as if it was a native widget.
123
+ def embed(&block)
124
+ @opts[:embed] = block
125
+ end
119
126
 
120
127
  # can be any of:
121
128
  # :quiet Supperss all output!
@@ -222,9 +222,9 @@ class MPlayer
222
222
 
223
223
  def cmdline(target = parent.opts[:path])
224
224
  cmd = "#{parent.opts[:program]} -slave "
225
- cmd += "-wid #{parent.opts[:embed]} " if parent.opts[:embed]
225
+ cmd += "-wid #{parent.opts[:embed].call} " if parent.opts[:embed]
226
226
  cmd += "-playlist " if target=~ /\.m3u$/
227
- cmd += target.to_s
227
+ cmd += '"' + target.to_s + '"'
228
228
  end
229
229
 
230
230
  def lock!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_mplayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Sanders