aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emms-player-xine.el79
-rw-r--r--emms-setup.el4
2 files changed, 82 insertions, 1 deletions
diff --git a/emms-player-xine.el b/emms-player-xine.el
new file mode 100644
index 0000000..b9be937
--- /dev/null
+++ b/emms-player-xine.el
@@ -0,0 +1,79 @@
+;;; emms-player-xine.el --- xine support for EMMS
+
+;; Copyright (C) 2007 Free Software Foundation, Inc.
+
+;; Author: Tassilo Horn <tassilo@member.fsf.org>
+
+;; This file is part of EMMS.
+
+;; EMMS is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
+
+;; EMMS is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with EMMS; if not, write to the Free Software Foundation,
+;; Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; This provides a player that uses xine. It supports pause and
+;; seeking.
+
+;;; Code:
+
+;; TODO: The video window cannot be disabled and I dunno how seeking works with
+;; xine's stdin control. I asked on gmane.comp.video.xine.user
+;; (<87y7ohqcbq.fsf@baldur.tsdh.de>)...
+
+(require 'emms-player-simple)
+
+(define-emms-simple-player xine '(file url)
+ (regexp-opt '(".ogg" ".mp3" ".wav" ".mpg" ".mpeg" ".wmv" ".wma"
+ ".mov" ".avi" ".divx" ".ogm" ".asf" ".mkv" "http://" "mms://"
+ ".rm" ".rmvb" ".mp4" ".flac" ".vob"))
+ "xine" "--no-gui" "--no-logo" "--no-splash" "--no-reload" "--stdctl")
+
+(emms-player-set emms-player-xine
+ 'pause
+ 'emms-player-xine-pause)
+
+;;; Pause is also resume for xine
+(emms-player-set emms-player-xine
+ 'resume
+ nil)
+
+;; TODO: Find out how seeking works.
+;; (emms-player-set emms-player-xine
+;; 'seek
+;; 'emms-player-xine-seek)
+
+;; (emms-player-set emms-player-xine
+;; 'seek-to
+;; 'emms-player-xine-seek-to)
+
+(defun emms-player-xine-pause ()
+ "Depends on xine's --stdctl mode."
+ (process-send-string
+ emms-player-simple-process-name "pause\n"))
+
+;; TODO: Find out how seeking works.
+;; (defun emms-player-xine-seek (sec)
+;; "Depends on xine's --stdctl mode."
+;; (process-send-string
+;; emms-player-simple-process-name
+;; (format "seek %d\n" sec)))
+
+;; (defun emms-player-xine-seek-to (sec)
+;; "Depends on xine's --stdctl mode."
+;; (process-send-string
+;; emms-player-simple-process-name
+;; (format "seek %d 2\n" sec)))
+
+(provide 'emms-player-xine)
+;;; emms-player-xine.el ends here
diff --git a/emms-setup.el b/emms-setup.el
index c7e6f67..5657c38 100644
--- a/emms-setup.el
+++ b/emms-setup.el
@@ -50,7 +50,8 @@
'(emms-player-mpg321
emms-player-ogg123
emms-player-mplayer-playlist
- emms-player-mplayer)
+ emms-player-mplayer
+ emms-player-xine)
"*Default list of players for emms-setup."
:group 'emms-setup
:type 'list)
@@ -101,6 +102,7 @@ stable features which come with the Emms distribution."
(require 'emms-lyrics)
(require 'emms-playing-time)
(require 'emms-player-mpd)
+ (require 'emms-player-xine)
(require 'emms-playlist-sort)
(require 'emms-browser)
(require 'emms-lastfm))