2023-09-29 Fred Gleason <fredg@paravelsystems.com>

* Added a '--dump-panel-updates' switch to rdairplay(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-09-29 14:05:04 -04:00
parent 5118c36219
commit dab81a32be
5 changed files with 76 additions and 30 deletions

View File

@ -24404,3 +24404,5 @@
'lib/rdweb.cpp' and 'lib/rdweb.h'.
* Added a '--dump-panel-updates' switch to rdpanel(1).
* Added a rdpanel(1) man page.
2023-09-29 Fred Gleason <fredg@paravelsystems.com>
* Added a '--dump-panel-updates' switch to rdairplay(1).

View File

@ -6,7 +6,7 @@
<refmeta>
<refentrytitle>rdairplay</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>July 2019</refmiscinfo>
<refmiscinfo class='source'>September 2023</refmiscinfo>
<refmiscinfo class='manual'>Linux Audio Manual</refmiscinfo>
</refmeta>
<refnamediv>
@ -32,27 +32,68 @@
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>rdairplay</command>
<arg choice='opt'><replaceable>log-spec</replaceable>=<arg choice='opt'>:<replaceable>next-line</replaceable><arg choice='opt'>+</arg></arg></arg>
<sbr/>
<arg choice='opt'><replaceable>OPTIONS</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id='description'><title>Description</title>
<para>
Where <replaceable>log-spec</replaceable> refers to one of the three
log machines (<userinput>--log1</userinput>, <userinput>--log2</userinput>
or <userinput>--log3</userinput>, referring to the
<computeroutput>Main Log</computeroutput>,
<computeroutput>Aux 1 Log</computeroutput>,
<computeroutput>Aux 2 Log</computeroutput> log machines, respectively)
and <replaceable>nextline</replaceable>
to the line number to do a 'make next' to after the log is loaded
(default = <userinput>0</userinput>). If the
<userinput>+</userinput> is appended, then the log is started after the
'make next'.
The <command>rdairplay</command><manvolnum>1</manvolnum> module is the
primary interface for executing logs other audio content. This man page
documents its command-line arguments. For overview of the UI and other
elements, see the <emphasis>Running Logs with RDAirPlay</emphasis>
chapter in the
<emphasis>Rivendell Operations and Administration Guide</emphasis>.
</para>
</refsect1>
<refsect1 id='options'><title>Options</title>
<variablelist>
<varlistentry>
<term>
<replaceable>log-spec</replaceable>=<replaceable>log-name</replaceable>[:<replaceable>next-line</replaceable>[+]]
</term>
<listitem>
<para>
After startup, load the <replaceable>log-name</replaceable> log into
the log machine specified by <replaceable>log-spec</replaceable>.
If a <replaceable>next-line</replaceable> value has been specified,
then do a <userinput>make next</userinput> to that line. If a
<userinput>+</userinput> has been appended to the line number,
then start the log.
</para>
<para>
<replaceable>log-spec</replaceable>
must be <userinput>--log1</userinput>,
<userinput>--log2</userinput>
or <userinput>--log3</userinput>, referring to the
<computeroutput>Main Log</computeroutput>,
<computeroutput>Aux 1 Log</computeroutput> or
<computeroutput>Aux 2 Log</computeroutput> log machines
respectively. It is possible to use multiple
<replaceable>log-spec</replaceable> clauses. If multiple clauses
referring to the same log machine are given, then the last one
specified will be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--dump-panel-updates</option>
</term>
<listitem>
<para>
When this option is given,
<command>rdairplay</command><manvolnum>1</manvolnum> will print
a dump of the currently loaded sound panel array to
standard output each time the Rivendell user logged into the system
is changed.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id='examples'><title>Examples</title>
<variablelist remap='TP'>
<varlistentry>

View File

@ -54,6 +54,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
QString stop_rmls[3];
QPixmap bgmap;
QString err_msg;
bool dump_panel_updates=false;
air_panel=NULL;
air_tracker=NULL;
@ -89,6 +90,10 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
air_start_line[i]=0;
air_start_start[i]=false;
for(unsigned j=0;j<rda->cmdSwitch()->keys();j++) {
if(rda->cmdSwitch()->key(j)=="--dump-panel-updates") {
dump_panel_updates=true;
rda->cmdSwitch()->setProcessed(j,true);
}
if(rda->cmdSwitch()->key(j)==QString::asprintf("--log%u",i+1)) {
air_start_logname[i]=rda->cmdSwitch()->value(j);
for(int k=0;k<rda->cmdSwitch()->value(j).length();k++) {
@ -412,12 +417,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
rda->airplayConf()->panels(RDAirPlayConf::UserPanel)){
int card=-1;
air_panel=
new SoundPanel(rda->airplayConf()->panels(RDAirPlayConf::StationPanel),
rda->airplayConf()->panels(RDAirPlayConf::UserPanel),
rda->airplayConf()->flashPanel(),
"RDAirPlay",
rda->airplayConf()->buttonLabelTemplate(),false,
air_event_player,air_cart_dialog,this);
new SoundPanel(air_event_player,air_cart_dialog,dump_panel_updates,this);
air_panel->soundPanelWidget()->
setPauseEnabled(rda->airplayConf()->panelPauseEnabled());
air_panel->soundPanelWidget()->setCard(0,rda->airplayConf()->

View File

@ -23,14 +23,19 @@
#include "colors.h"
#include "soundpanel.h"
SoundPanel::SoundPanel(int station_panels,int user_panels,bool flash,
const QString &caption,const QString &label_template,
bool extended,RDEventPlayer *player,
RDCartDialog *cart_dialog,QWidget *parent)
SoundPanel::SoundPanel(RDEventPlayer *player,RDCartDialog *cart_dialog,
bool dump_panel_updates,QWidget *parent)
: RDWidget(parent)
{
d_panel=new RDSoundPanel(station_panels,user_panels,flash,caption,
label_template,extended,player,cart_dialog,this);
d_panel=
new RDSoundPanel(rda->airplayConf()->panels(RDAirPlayConf::StationPanel),
rda->airplayConf()->panels(RDAirPlayConf::UserPanel),
rda->airplayConf()->flashPanel(),
"RDAirPlay",
rda->airplayConf()->buttonLabelTemplate(),
false,
player,cart_dialog,this);
d_panel->setDumpPanelUpdates(dump_panel_updates);
}

View File

@ -28,10 +28,8 @@ class SoundPanel : public RDWidget
{
Q_OBJECT
public:
SoundPanel(int station_panels,int user_panels,bool flash,
const QString &caption,const QString &label_template,
bool extended,RDEventPlayer *player,RDCartDialog *cart_dialog,
QWidget *parent=0);
SoundPanel(RDEventPlayer *player,RDCartDialog *cart_dialog,
bool dump_panel_updates,QWidget *parent);
~SoundPanel();
RDSoundPanel *soundPanelWidget() const;