[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mpv 91b094c966 02/50: initial import
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mpv 91b094c966 02/50: initial import |
Date: |
Tue, 28 Dec 2021 00:58:32 -0500 (EST) |
branch: elpa/mpv
commit 91b094c966fe9a721fb05cfba8880f0bc9e7bb09
Author: Johann Klähn <kljohann@gmail.com>
Commit: Johann Klähn <kljohann@gmail.com>
initial import
---
mpv-mode.el | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/mpv-mode.el b/mpv-mode.el
new file mode 100644
index 0000000000..70a4134810
--- /dev/null
+++ b/mpv-mode.el
@@ -0,0 +1,63 @@
+;;; mpv-mode.el --- control mpv for easy note-taking
+
+;; Copyright (C) 2014 Johann Klähn
+
+;; Author: Johann Klähn <kljohann@gmail.com>
+;; Keywords: tools, multimedia
+;; Package-Requires: ((json "1.3"))
+
+;; This program 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 3 of the License, or
+;; (at your option) any later version.
+
+;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(eval-when-compile (require 'names))
+
+(require 'json)
+
+(define-namespace mpv-mode-
+
+(defcustom executable "mpv"
+ "Name or path to the mpv executable."
+ :type 'file)
+
+(defvar -process nil)
+(defvar -queue nil)
+
+(defun -alive-p ()
+ (and -process (eq (process-status -process) 'run)))
+
+(defun -start (&rest args)
+ (when (-alive-p)
+ (kill-process -process))
+
+ (let ((socket (make-temp-name
+ (expand-file-name "mpv-mode-" temporary-file-directory))))
+ (setq -process
+ (apply #'start-process "mpv-player" nil executable
+ (concat "--input-unix-socket=" socket) args))
+ (set-process-query-on-exit-flag -process nil)
+ (while (and (-alive-p) (not (file-exists-p socket)))
+ (sleep-for 0.05))
+ (setq -queue (tq-create
+ (make-network-process :name "mpv-socket"
+ :family 'local
+ :service socket)))))
+)
+
+(provide 'mpv-mode)
+;;; mpv-mode.el ends here
- [nongnu] branch elpa/mpv created (now 9bd6d36cc7), ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 899559ae77 04/50: some fixes, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ee505feff0 16/50: add .gitignore, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0a02225f4e 30/50: autoload all interactive functions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 27b98410e5 45/50: Fix decreasing volume or speed by multiple steps, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 8da5b19f3d 07/50: cleanup, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 91b094c966 02/50: initial import,
ELPA Syncer <=
- [nongnu] elpa/mpv f0da905fd3 06/50: implement pausing and inserting playback position, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 6338f0d6b5 12/50: rename to mpv.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv e3fad297cd 18/50: add README.md, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv c6b3fa013c 36/50: Add mpv-run-command function to synchronously run commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9dedf3b7c1 34/50: Monkey-patch org-timer-item instead of reimplementing, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 174cd4b68b 31/50: call expand-file-name on files passed to mpv-play, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 3849da1e45 01/50: root commit, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 33ca8987ed 03/50: work around spurious event messages, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 6fe510798a 26/50: fix mpv-speed-set, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv fcdca618df 29/50: add badge for MELPA stable, ELPA Syncer, 2021/12/28