From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-5.0 required=3.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: dtas-all@80x24.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 9A57463386E for ; Mon, 7 Sep 2015 21:40:45 +0000 (UTC) Received: from localhost ([::1]:58890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ49c-00068k-W5 for dtas-all@80x24.org; Mon, 07 Sep 2015 17:40:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ49a-00067R-W1 for dtas-all@nongnu.org; Mon, 07 Sep 2015 17:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ49a-0001U8-47 for dtas-all@nongnu.org; Mon, 07 Sep 2015 17:40:42 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:39405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ49Z-0001Tr-Tu for dtas-all@nongnu.org; Mon, 07 Sep 2015 17:40:42 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7984363386C for ; Mon, 7 Sep 2015 21:40:37 +0000 (UTC) From: Eric Wong To: Subject: [PATCH 2/2] player: add "queue cat" command Date: Mon, 7 Sep 2015 21:40:34 +0000 Message-Id: <20150907214034.28039-3-e@80x24.org> In-Reply-To: <20150907214034.28039-1-e@80x24.org> References: <20150907214034.28039-1-e@80x24.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.71.152.64 X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Sender: dtas-all-bounces+dtas-all=80x24.org@nongnu.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