rmplayer 1.0 → 1.0.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.
- data/README +8 -1
- data/Rakefile +1 -1
- data/lib/rmplayer/mplayer.rb +7 -2
- metadata +1 -1
data/README
CHANGED
@@ -2,9 +2,16 @@
|
|
2
2
|
|
3
3
|
Remote MPlayer. VLC HTTP interface implementation for MPlayer.
|
4
4
|
|
5
|
-
|
5
|
+
Basically rmplayer lets you use VLC Remote app for Android to control MPlayer instead of VLC. It may work with other VLC apps but it wasn't tested.
|
6
|
+
|
7
|
+
= Install =
|
8
|
+
|
9
|
+
gem install rmplayer
|
6
10
|
|
7
11
|
= Usage =
|
8
12
|
|
9
13
|
rmplayer [mplayer options] file_name
|
10
14
|
|
15
|
+
= Contributing =
|
16
|
+
|
17
|
+
If you find this project useful don't hesitate to contribute to it. Right now things might be rough around the edges. It just scratches my own itch. Make it scratch yours.
|
data/Rakefile
CHANGED
data/lib/rmplayer/mplayer.rb
CHANGED
@@ -9,7 +9,7 @@ class MPlayer
|
|
9
9
|
pstdin, pstdout, pstderr = IO.pipe, IO.pipe, IO.pipe
|
10
10
|
|
11
11
|
command = %w(/usr/bin/mplayer -slave -quiet) + args
|
12
|
-
fork do
|
12
|
+
@pid = fork do
|
13
13
|
STDIN.reopen pstdin.first
|
14
14
|
pstdin.last.close
|
15
15
|
|
@@ -72,7 +72,12 @@ class MPlayer
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def quit
|
75
|
-
|
75
|
+
begin
|
76
|
+
send('quit')
|
77
|
+
ensure
|
78
|
+
Process.waitpid(@pid) if @pid
|
79
|
+
@pid = nil
|
80
|
+
end
|
76
81
|
end
|
77
82
|
|
78
83
|
def seek(value)
|