From: Eric Wong <e@80x24.org>
To: <dtas-all@nongnu.org>
Subject: [PATCH 2/2] player: add "queue cat" command
Date: Mon, 7 Sep 2015 21:40:34 +0000 [thread overview]
Message-ID: <20150907214034.28039-3-e@80x24.org> (raw)
In-Reply-To: <20150907214034.28039-1-e@80x24.org>
This will dump the contents of the current queue, including
positional seeking information and commands. This is mainly
intended for debugging and tools which rely on dtas internals.
---
Documentation/dtas-player_protocol.txt | 5 +++++
lib/dtas/player.rb | 2 ++
2 files changed, 7 insertions(+)
diff --git a/Documentation/dtas-player_protocol.txt b/Documentation/dtas-player_protocol.txt
index e1b2487..b02d1e5 100644
--- a/Documentation/dtas-player_protocol.txt
+++ b/Documentation/dtas-player_protocol.txt
@@ -166,6 +166,11 @@ Commands here should be alphabetized according to `LC_ALL=C sort'
* play_pause - toggle the play/pause state. This starts playback if
paused, and pauses playback if playing.
+* queue cat - dump the contents of the queue as YAML
+ This may include arbitrary commands to be executed, filenames,
+ and offsets for playback. The format is not intended to be
+ stable and subject to internal changes in dtas-player.
+
* restart - restarts all processes in the current pipeline. Playback
will be momentarily interrupted while this change occurs. This is
necessary if one of the commands (e.g. sox or ecasound) or loaded
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index a102618..a1e2040 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -251,6 +251,8 @@ class DTAS::Player # :nodoc:
tl_handler(io, msg)
when "trim"
trim_handler(io, msg)
+ when "queue"
+ msg[0] == "cat" and io.emit(@queue.to_yaml)
end
end
--
EW
next prev parent reply other threads:[~2015-09-07 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 21:40 [PATCH 0/2] minor updates for readahead for -player Eric Wong
2015-09-07 21:40 ` [PATCH 1/2] use a common /dev/null Eric Wong
2015-09-07 21:40 ` Eric Wong [this message]
2015-09-20 23:02 ` [PATCH] dtas-readahead: new script for -player users on Linux Eric Wong
2015-10-03 9:38 ` [PATCH] dtas-readahead: make executable Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://80x24.org/dtas/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150907214034.28039-3-e@80x24.org \
--to=e@80x24.org \
--cc=dtas-all@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).