summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-12-01 19:22:16 -0500
committerSacha Chua <sacha@sachachua.com>2022-12-01 19:22:16 -0500
commitc3b3180a18decabe0fdd4dc16a1f01f47ab817b8 (patch)
tree4ab937a7c75df4d24b5181e77e7e7b16bc08fc9c
parentd89e6d82f99c2d46b8f88bb6752b3d69d6b999b7 (diff)
downloademacsconf-el-c3b3180a18decabe0fdd4dc16a1f01f47ab817b8.tar.xz
emacsconf-el-c3b3180a18decabe0fdd4dc16a1f01f47ab817b8.zip
easy rebroadcasting from one stream to another
-rw-r--r--emacsconf-stream.el15
-rw-r--r--emacsconf.el11
2 files changed, 23 insertions, 3 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el
index 9d14696..5d38c12 100644
--- a/emacsconf-stream.el
+++ b/emacsconf-stream.el
@@ -844,6 +844,21 @@ ffplay URL
(time-add (current-time) (seconds-to-time (- duration playback-position)))
emacsconf-timezone))))
+(defun emacsconf-stream-rebroadcast (source-track dest-track)
+ (interactive
+ (let* ((source (emacsconf-complete-track "Source: "))
+ (others (remove source emacsconf-tracks)))
+ (list
+ source
+ (if (= (length others) 1)
+ (car others)
+ (emacsconf-complete-track "Destination: " others)))))
+ (setq source-track (emacsconf-get-track source-track))
+ (setq dest-track (emacsconf-get-track dest-track))
+ (emacsconf-stream-track-ssh dest-track "nohup" "mpv" (plist-get source-track :stream) "--profile=full" "&"))
+;; (emacsconf-stream-rebroadcast "Development" "General")
+;; (emacsconf-stream-send-to-mpv "General" '(:command ("video-zoom" "0")))
+;; (emacsconf-stream-send-to-mpv "General" "set video-zoom 0")
;;; xdotool
(defun emacsconf-stream-xdotool (track command)
diff --git a/emacsconf.el b/emacsconf.el
index b96d8da..608f4dc 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -1077,7 +1077,9 @@
(string= name (plist-get track :id))))
emacsconf-tracks)
(let ((talk (emacsconf-resolve-talk name)))
- (when talk (emacsconf-get-track talk)))
+ (seq-find (lambda (track) (or (string= (plist-get talk :track) (plist-get track :name))
+ (string= (plist-get talk :track) (plist-get track :id))))
+ emacsconf-tracks))
name)
name))
@@ -1089,8 +1091,11 @@
info))
emacsconf-tracks))
-(defun emacsconf-complete-track ()
- (emacsconf-get-track (completing-read "Track: " (mapcar (lambda (o) (plist-get o :name)) emacsconf-tracks))))
+(defun emacsconf-complete-track (&optional prompt tracks)
+ (emacsconf-get-track
+ (completing-read
+ (or prompt "Track: ")
+ (mapcar (lambda (o) (plist-get o :name)) (or tracks emacsconf-tracks)))))
(defun emacsconf-by-day (info)
(seq-group-by (lambda (o)