mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-21 07:13:06 +02:00
2022-11-01 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdcatch(1) to use the notification mechanism instead of the 'Input Monitor State' catch command. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
eb060e37c9
commit
8e7df3585d
@ -23596,3 +23596,6 @@
|
|||||||
2022-10-31 Fred Gleason <fredg@paravelsystems.com>
|
2022-10-31 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Refactored rdcatch(1) to use the notification mechanism instead of
|
* Refactored rdcatch(1) to use the notification mechanism instead of
|
||||||
the 'StopDeck' catch command.
|
the 'StopDeck' catch command.
|
||||||
|
2022-11-01 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Refactored rdcatch(1) to use the notification mechanism instead of
|
||||||
|
the 'Input Monitor State' catch command.
|
||||||
|
@ -131,36 +131,6 @@
|
|||||||
</variablelist>
|
</variablelist>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 xml:id="sect.privileged_commands.input_monitor_state">
|
|
||||||
<title>Input Monitor State</title>
|
|
||||||
<para>
|
|
||||||
Turn the input monitor on or off.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>MN <replaceable>deck-num</replaceable>
|
|
||||||
<replaceable>state</replaceable>!</userinput>
|
|
||||||
</para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable>deck-num</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The number of the deck.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable>state</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<computeroutput>1</computeroutput> = Enabled,
|
|
||||||
<computeroutput>0</computeroutput> = Disabled.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</sect2>
|
|
||||||
|
|
||||||
<sect2 xml:id="sect.privileged_commands.set_exit_code">
|
<sect2 xml:id="sect.privileged_commands.set_exit_code">
|
||||||
<title>Set Exit Code</title>
|
<title>Set Exit Code</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -643,7 +643,7 @@
|
|||||||
<row>
|
<row>
|
||||||
<entry>Operation</entry>
|
<entry>Operation</entry>
|
||||||
<entry>2</entry>
|
<entry>2</entry>
|
||||||
<entry>Integer. 1 [RDCatchEvent::StopDeckOp]</entry>
|
<entry>Integer. 4 [RDCatchEvent::StopDeckOp]</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Target Hostname</entry>
|
<entry>Target Hostname</entry>
|
||||||
@ -663,6 +663,117 @@
|
|||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 xml:id="sect.rdcatch_set_input_monitor">
|
||||||
|
<title>Set Input Monitor</title>
|
||||||
|
<para>
|
||||||
|
Emitted by <command>rdcatch</command><manvolnum>1</manvolnum> to
|
||||||
|
turn a deck input monitor on or off.
|
||||||
|
</para>
|
||||||
|
<table xml:id="table.rdcatch_set_input_monitor" frame="all" pgwide="0">
|
||||||
|
<title>RDCatch Set Input Monitor Fields</title>
|
||||||
|
<tgroup cols="3" align="left" colsep="1" rowsep="1">
|
||||||
|
<colspec colname="Field" colwidth="10.0*"/>
|
||||||
|
<colspec colname="Offset" colwidth="2.0*"/>
|
||||||
|
<colspec colname="Value" colwidth="10.0*"/>
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>Field</entry>
|
||||||
|
<entry>Offset</entry>
|
||||||
|
<entry>Value</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Keyword</entry>
|
||||||
|
<entry>0</entry>
|
||||||
|
<entry>CATCH</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Originating Hostname</entry>
|
||||||
|
<entry>1</entry>
|
||||||
|
<entry>String, from STATIONS.NAME</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Operation</entry>
|
||||||
|
<entry>2</entry>
|
||||||
|
<entry>Integer. 5 [RDCatchEvent::SetInputMonitorOp]</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Target Hostname</entry>
|
||||||
|
<entry>3</entry>
|
||||||
|
<entry>String, from STATIONS.NAME</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Deck Channel</entry>
|
||||||
|
<entry>4</entry>
|
||||||
|
<entry>
|
||||||
|
Integer. Record decks have values in the range 1-127,
|
||||||
|
while play decks have values in the range 128-254.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>State</entry>
|
||||||
|
<entry>5</entry>
|
||||||
|
<entry>
|
||||||
|
Boolean. 0=False, 1=True.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
<sect2 xml:id="sect.rdcatch_set_input_monitor_response">
|
||||||
|
<title>Set Input Monitor Response</title>
|
||||||
|
<para>
|
||||||
|
Emitted by <command>rdcatchd</command><manvolnum>8</manvolnum> to
|
||||||
|
signal change of a deck input monitor.
|
||||||
|
</para>
|
||||||
|
<table xml:id="table.rdcatch_set_input_monitor_response" frame="all" pgwide="0">
|
||||||
|
<title>RDCatch Set Input Monitor Fields</title>
|
||||||
|
<tgroup cols="3" align="left" colsep="1" rowsep="1">
|
||||||
|
<colspec colname="Field" colwidth="10.0*"/>
|
||||||
|
<colspec colname="Offset" colwidth="2.0*"/>
|
||||||
|
<colspec colname="Value" colwidth="10.0*"/>
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>Field</entry>
|
||||||
|
<entry>Offset</entry>
|
||||||
|
<entry>Value</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Keyword</entry>
|
||||||
|
<entry>0</entry>
|
||||||
|
<entry>CATCH</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Originating Hostname</entry>
|
||||||
|
<entry>1</entry>
|
||||||
|
<entry>String, from STATIONS.NAME</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Operation</entry>
|
||||||
|
<entry>2</entry>
|
||||||
|
<entry>Integer. 6 [RDCatchEvent::SetInputMonitorResponseOp]</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>Deck Channel</entry>
|
||||||
|
<entry>3</entry>
|
||||||
|
<entry>
|
||||||
|
Integer. Record decks have values in the range 1-127,
|
||||||
|
while play decks have values in the range 128-254.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>State</entry>
|
||||||
|
<entry>4</entry>
|
||||||
|
<entry>
|
||||||
|
Boolean. 0=False, 1=True.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
@ -89,7 +89,7 @@ void RDCatchConnect::reloadDropboxes()
|
|||||||
SendCommand("RX!");
|
SendCommand("RX!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void RDCatchConnect::monitor(int deck,bool state)
|
void RDCatchConnect::monitor(int deck,bool state)
|
||||||
{
|
{
|
||||||
SendCommand(QString::asprintf("MN %d %d!",deck,state));
|
SendCommand(QString::asprintf("MN %d %d!",deck,state));
|
||||||
@ -105,7 +105,7 @@ void RDCatchConnect::toggleMonitor(int deck)
|
|||||||
SendCommand(QString::asprintf("MN %d 1!",deck));
|
SendCommand(QString::asprintf("MN %d 1!",deck));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void RDCatchConnect::setExitCode(int id,RDRecording::ExitCode code,
|
void RDCatchConnect::setExitCode(int id,RDRecording::ExitCode code,
|
||||||
const QString &msg)
|
const QString &msg)
|
||||||
@ -277,6 +277,7 @@ void RDCatchConnect::DispatchCommand()
|
|||||||
cc_heartbeat_timer->start(CC_HEARTBEAT_INTERVAL);
|
cc_heartbeat_timer->start(CC_HEARTBEAT_INTERVAL);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
if(!strcmp(args[0],"MN")) { // Monitor State
|
if(!strcmp(args[0],"MN")) { // Monitor State
|
||||||
if(sscanf(args[1],"%d",&deck)!=1) {
|
if(sscanf(args[1],"%d",&deck)!=1) {
|
||||||
return;
|
return;
|
||||||
@ -290,6 +291,7 @@ void RDCatchConnect::DispatchCommand()
|
|||||||
emit monitorChanged(cc_serial,deck,false);
|
emit monitorChanged(cc_serial,deck,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,15 +49,15 @@ class RDCatchConnect : public QObject
|
|||||||
void reloadDropboxes();
|
void reloadDropboxes();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void monitor(int deck,bool state);
|
// void monitor(int deck,bool state);
|
||||||
void toggleMonitor(int deck);
|
// void toggleMonitor(int deck);
|
||||||
void setExitCode(int id,RDRecording::ExitCode code,const QString &msg);
|
void setExitCode(int id,RDRecording::ExitCode code,const QString &msg);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void connected(int serial,bool state);
|
void connected(int serial,bool state);
|
||||||
void statusChanged(int serial,unsigned channel,RDDeck::Status status,
|
void statusChanged(int serial,unsigned channel,RDDeck::Status status,
|
||||||
int id,const QString &cutname);
|
int id,const QString &cutname);
|
||||||
void monitorChanged(int serial,unsigned channel,bool state);
|
// void monitorChanged(int serial,unsigned channel,bool state);
|
||||||
void meterLevel(int serial,int deck,int chan,int level);
|
void meterLevel(int serial,int deck,int chan,int level);
|
||||||
void eventUpdated(int id);
|
void eventUpdated(int id);
|
||||||
void eventPurged(int id);
|
void eventPurged(int id);
|
||||||
|
@ -145,9 +145,15 @@ void RDCatchEvent::setDeckStatus(RDDeck::Status status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RDCatchEvent::isValid() const
|
bool RDCatchEvent::inputMonitorActive() const
|
||||||
{
|
{
|
||||||
return true;
|
return d_input_monitor_active;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDCatchEvent::setInputMonitorActive(bool state)
|
||||||
|
{
|
||||||
|
d_input_monitor_active=state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -157,6 +163,11 @@ bool RDCatchEvent::read(const QString &str)
|
|||||||
|
|
||||||
RDCatchEvent::Operation op=RDCatchEvent::NullOp;
|
RDCatchEvent::Operation op=RDCatchEvent::NullOp;
|
||||||
QStringList f0=str.split(" ");
|
QStringList f0=str.split(" ");
|
||||||
|
|
||||||
|
unsigned chan=0;
|
||||||
|
unsigned num=0;
|
||||||
|
RDDeck::Status status=RDDeck::Offline;
|
||||||
|
int state=0;
|
||||||
bool ok=false;
|
bool ok=false;
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
@ -168,19 +179,24 @@ bool RDCatchEvent::read(const QString &str)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
op=(RDCatchEvent::Operation)f0.at(2).toUInt(&ok);
|
op=(RDCatchEvent::Operation)f0.at(2).toUInt(&ok);
|
||||||
|
if(!ok) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Operation-specific Fields
|
// Operation-specific Fields
|
||||||
//
|
//
|
||||||
if(ok&&(op==RDCatchEvent::DeckEventProcessedOp)) {
|
rda->syslog(LOG_NOTICE,"HERE0 op: %u",op);
|
||||||
|
switch(op) {
|
||||||
|
case RDCatchEvent::DeckEventProcessedOp:
|
||||||
if(f0.size()!=5) {
|
if(f0.size()!=5) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned chan=f0.at(3).toUInt(&ok);
|
chan=f0.at(3).toUInt(&ok);
|
||||||
if(!ok) {
|
if(!ok) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned num=f0.at(4).toUInt(&ok);
|
num=f0.at(4).toUInt(&ok);
|
||||||
if(ok) {
|
if(ok) {
|
||||||
d_operation=op;
|
d_operation=op;
|
||||||
d_host_name=f0.at(1);
|
d_host_name=f0.at(1);
|
||||||
@ -188,24 +204,24 @@ bool RDCatchEvent::read(const QString &str)
|
|||||||
d_event_number=num;
|
d_event_number=num;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
|
||||||
if(ok&&(op==RDCatchEvent::DeckStatusQueryOp)) {
|
case RDCatchEvent::DeckStatusQueryOp:
|
||||||
if(f0.size()!=3) {
|
if(f0.size()!=3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
d_operation=op;
|
d_operation=op;
|
||||||
d_host_name=f0.at(1);
|
d_host_name=f0.at(1);
|
||||||
return true;
|
return true;
|
||||||
}
|
break;
|
||||||
|
|
||||||
if(ok&&(op==RDCatchEvent::DeckStatusResponseOp)) {
|
case RDCatchEvent::DeckStatusResponseOp:
|
||||||
if(f0.size()!=8) {
|
if(f0.size()!=8) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int chan=f0.at(3).toUInt(&ok);
|
chan=f0.at(3).toUInt(&ok);
|
||||||
if(ok&&(chan<255)) {
|
if(ok&&(chan<255)) {
|
||||||
RDDeck::Status status=(RDDeck::Status)f0.at(4).toUInt(&ok);
|
status=(RDDeck::Status)f0.at(4).toUInt(&ok);
|
||||||
if(ok&&(status<RDDeck::LastStatus)) {
|
if(ok&&(status<RDDeck::LastStatus)) {
|
||||||
unsigned id=f0.at(5).toUInt(&ok);
|
unsigned id=f0.at(5).toUInt(&ok);
|
||||||
if(ok) {
|
if(ok) {
|
||||||
@ -226,17 +242,60 @@ bool RDCatchEvent::read(const QString &str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
|
||||||
if(ok&&(op==RDCatchEvent::StopDeckOp)) {
|
case RDCatchEvent::StopDeckOp:
|
||||||
if(f0.size()!=5) {
|
if(f0.size()!=5) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
d_operation=op;
|
chan=f0.at(4).toInt(&ok);
|
||||||
d_host_name=f0.at(1);
|
if(ok&&(chan<255)) {
|
||||||
d_target_host_name=f0.at(3);
|
d_operation=op;
|
||||||
d_deck_channel=f0.at(4).toInt();
|
d_host_name=f0.at(1);
|
||||||
return true;
|
d_target_host_name=f0.at(3);
|
||||||
|
d_deck_channel=chan;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
if(f0.size()!=6) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
chan=f0.at(4).toInt(&ok);
|
||||||
|
if(ok&&(chan<255)) {
|
||||||
|
state=f0.at(5).toUInt(&ok);
|
||||||
|
if((state==0)||(state==1)) {
|
||||||
|
d_operation=op;
|
||||||
|
d_host_name=f0.at(1);
|
||||||
|
d_target_host_name=f0.at(3);
|
||||||
|
d_deck_channel=chan;
|
||||||
|
d_input_monitor_active=(state==1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
|
if(f0.size()!=5) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
chan=f0.at(3).toInt(&ok);
|
||||||
|
if(ok&&(chan<255)) {
|
||||||
|
state=f0.at(4).toUInt(&ok);
|
||||||
|
if((state==0)||(state==1)) {
|
||||||
|
d_operation=op;
|
||||||
|
d_host_name=f0.at(1);
|
||||||
|
d_deck_channel=chan;
|
||||||
|
d_input_monitor_active=(state==1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::NullOp:
|
||||||
|
case RDCatchEvent::LastOp:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -276,6 +335,17 @@ QString RDCatchEvent::write() const
|
|||||||
case RDCatchEvent::LastOp:
|
case RDCatchEvent::LastOp:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
ret+=" "+d_target_host_name;
|
||||||
|
ret+=QString::asprintf(" %u",d_deck_channel);
|
||||||
|
ret+=QString::asprintf(" %u",d_input_monitor_active);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
|
ret+=QString::asprintf(" %u",d_deck_channel);
|
||||||
|
ret+=QString::asprintf(" %u",d_input_monitor_active);
|
||||||
|
break;
|
||||||
|
|
||||||
case RDCatchEvent::StopDeckOp:
|
case RDCatchEvent::StopDeckOp:
|
||||||
ret+=" "+d_target_host_name;
|
ret+=" "+d_target_host_name;
|
||||||
ret+=QString::asprintf(" %u",d_deck_channel);
|
ret+=QString::asprintf(" %u",d_deck_channel);
|
||||||
@ -324,6 +394,19 @@ QString RDCatchEvent::dump() const
|
|||||||
ret+=QString::asprintf("deck channel: %u\n",d_deck_channel);
|
ret+=QString::asprintf("deck channel: %u\n",d_deck_channel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
ret+="operation: RDCatchEvent::DeckEventProcessedOp\n";
|
||||||
|
ret+="target hostname: "+d_target_host_name+"\n";
|
||||||
|
ret+=QString::asprintf("deck channel: %u\n",d_deck_channel);
|
||||||
|
ret+=QString::asprintf("input monitor active: %u\n",d_input_monitor_active);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
|
ret+="operation: RDCatchEvent::DeckEventProcessedOp\n";
|
||||||
|
ret+=QString::asprintf("deck channel: %u\n",d_deck_channel);
|
||||||
|
ret+=QString::asprintf("input monitor active: %u\n",d_input_monitor_active);
|
||||||
|
break;
|
||||||
|
|
||||||
case RDCatchEvent::NullOp:
|
case RDCatchEvent::NullOp:
|
||||||
case RDCatchEvent::LastOp:
|
case RDCatchEvent::LastOp:
|
||||||
break;
|
break;
|
||||||
@ -337,10 +420,12 @@ void RDCatchEvent::clear()
|
|||||||
{
|
{
|
||||||
d_operation=RDCatchEvent::NullOp;
|
d_operation=RDCatchEvent::NullOp;
|
||||||
d_host_name=rda->station()->name();
|
d_host_name=rda->station()->name();
|
||||||
|
d_target_host_name="";
|
||||||
d_event_id=0;
|
d_event_id=0;
|
||||||
d_cart_number=0;
|
d_cart_number=0;
|
||||||
d_cut_number=0;
|
d_cut_number=0;
|
||||||
d_deck_channel=0;
|
d_deck_channel=0;
|
||||||
d_event_number=0;
|
d_event_number=0;
|
||||||
|
d_input_monitor_active=false;
|
||||||
d_deck_status=RDDeck::Offline;
|
d_deck_status=RDDeck::Offline;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,8 @@ class RDCatchEvent
|
|||||||
public:
|
public:
|
||||||
enum Operation {NullOp=0,DeckEventProcessedOp=1,
|
enum Operation {NullOp=0,DeckEventProcessedOp=1,
|
||||||
DeckStatusQueryOp=2,DeckStatusResponseOp=3,
|
DeckStatusQueryOp=2,DeckStatusResponseOp=3,
|
||||||
StopDeckOp=5,LastOp=6};
|
StopDeckOp=4,SetInputMonitorOp=5,SetInputMonitorResponseOp=6,
|
||||||
|
LastOp=7};
|
||||||
RDCatchEvent(RDDeck::Status status);
|
RDCatchEvent(RDDeck::Status status);
|
||||||
RDCatchEvent();
|
RDCatchEvent();
|
||||||
Operation operation() const;
|
Operation operation() const;
|
||||||
@ -52,7 +53,8 @@ class RDCatchEvent
|
|||||||
void setEventNumber(int num);
|
void setEventNumber(int num);
|
||||||
RDDeck::Status deckStatus() const;
|
RDDeck::Status deckStatus() const;
|
||||||
void setDeckStatus(RDDeck::Status status);
|
void setDeckStatus(RDDeck::Status status);
|
||||||
bool isValid() const;
|
bool inputMonitorActive() const;
|
||||||
|
void setInputMonitorActive(bool state);
|
||||||
bool read(const QString &str);
|
bool read(const QString &str);
|
||||||
QString write() const;
|
QString write() const;
|
||||||
QString dump() const;
|
QString dump() const;
|
||||||
@ -67,6 +69,7 @@ class RDCatchEvent
|
|||||||
int d_cut_number;
|
int d_cut_number;
|
||||||
unsigned d_deck_channel;
|
unsigned d_deck_channel;
|
||||||
int d_event_number;
|
int d_event_number;
|
||||||
|
bool d_input_monitor_active;
|
||||||
RDDeck::Status d_deck_status;
|
RDDeck::Status d_deck_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ DeckMon::DeckMon(QString station,unsigned channel,QWidget *parent)
|
|||||||
{
|
{
|
||||||
mon_station=station;
|
mon_station=station;
|
||||||
mon_channel=channel;
|
mon_channel=channel;
|
||||||
|
mon_monitor_state=false;
|
||||||
|
|
||||||
setFrameStyle(Box|Raised);
|
setFrameStyle(Box|Raised);
|
||||||
setLineWidth(1);
|
setLineWidth(1);
|
||||||
@ -139,17 +140,6 @@ void DeckMon::enableMonitorButton(bool state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DeckMon::setMonitor(bool state)
|
|
||||||
{
|
|
||||||
if(state) {
|
|
||||||
mon_monitor_button->setPalette(*mon_monitor_palette);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
mon_monitor_button->setPalette(palette());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DeckMon::setStatus(RDDeck::Status status,int id,const QString &cutname)
|
void DeckMon::setStatus(RDDeck::Status status,int id,const QString &cutname)
|
||||||
{
|
{
|
||||||
if(id==0) {
|
if(id==0) {
|
||||||
@ -231,13 +221,38 @@ void DeckMon::setRightMeter(int level)
|
|||||||
void DeckMon::processCatchEvent(RDCatchEvent *evt)
|
void DeckMon::processCatchEvent(RDCatchEvent *evt)
|
||||||
{
|
{
|
||||||
if((evt->hostName()==mon_station)&&(evt->deckChannel()==mon_channel)) {
|
if((evt->hostName()==mon_station)&&(evt->deckChannel()==mon_channel)) {
|
||||||
if(evt->operation()==RDCatchEvent::DeckEventProcessedOp) {
|
switch(evt->operation()) {
|
||||||
|
case RDCatchEvent::DeckEventProcessedOp:
|
||||||
mon_event_light->trigger(evt->eventNumber());
|
mon_event_light->trigger(evt->eventNumber());
|
||||||
}
|
break;
|
||||||
|
|
||||||
if(evt->operation()==RDCatchEvent::DeckStatusResponseOp) {
|
case RDCatchEvent::DeckStatusResponseOp:
|
||||||
setStatus(evt->deckStatus(),evt->eventId(),
|
setStatus(evt->deckStatus(),evt->eventId(),
|
||||||
RDCut::cutName(evt->cartNumber(),evt->cutNumber()));
|
RDCut::cutName(evt->cartNumber(),evt->cutNumber()));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
|
if((evt->hostName()==mon_station)&&
|
||||||
|
(evt->deckChannel()==mon_channel)&&
|
||||||
|
(evt->inputMonitorActive()!=mon_monitor_state)) {
|
||||||
|
mon_monitor_state=evt->inputMonitorActive();
|
||||||
|
if(mon_monitor_state) {
|
||||||
|
mon_monitor_button->setPalette(mon_red_palette);
|
||||||
|
mon_monitor_button->setStyleSheet(mon_red_stylesheet);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mon_monitor_button->setPalette(palette());
|
||||||
|
mon_monitor_button->setStyleSheet("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::DeckStatusQueryOp:
|
||||||
|
case RDCatchEvent::StopDeckOp:
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
case RDCatchEvent::NullOp:
|
||||||
|
case RDCatchEvent::LastOp:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -245,7 +260,15 @@ void DeckMon::processCatchEvent(RDCatchEvent *evt)
|
|||||||
|
|
||||||
void DeckMon::monitorButtonData()
|
void DeckMon::monitorButtonData()
|
||||||
{
|
{
|
||||||
emit monitorClicked();
|
RDCatchEvent *evt=new RDCatchEvent();
|
||||||
|
|
||||||
|
evt->setOperation(RDCatchEvent::SetInputMonitorOp);
|
||||||
|
evt->setTargetHostName(mon_station);
|
||||||
|
evt->setDeckChannel(mon_channel);
|
||||||
|
evt->setInputMonitorActive(!mon_monitor_state);
|
||||||
|
rda->ripc()->sendCatchEvent(evt);
|
||||||
|
|
||||||
|
delete evt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Monitor a Rivendell Netcatcher Deck
|
// Monitor a Rivendell Netcatcher Deck
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -42,16 +42,11 @@ class DeckMon : public RDFrame
|
|||||||
void enableMonitorButton(bool state);
|
void enableMonitorButton(bool state);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setMonitor(bool state);
|
|
||||||
void setStatus(RDDeck::Status status,int id,const QString &cutname);
|
void setStatus(RDDeck::Status status,int id,const QString &cutname);
|
||||||
void setLeftMeter(int level);
|
void setLeftMeter(int level);
|
||||||
void setRightMeter(int level);
|
void setRightMeter(int level);
|
||||||
void processCatchEvent(RDCatchEvent *evt);
|
void processCatchEvent(RDCatchEvent *evt);
|
||||||
|
|
||||||
signals:
|
|
||||||
void monitorClicked();
|
|
||||||
// void abortClicked();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
|
||||||
@ -67,6 +62,7 @@ class DeckMon : public RDFrame
|
|||||||
QLabel *mon_status_label;
|
QLabel *mon_status_label;
|
||||||
QPushButton *mon_abort_button;
|
QPushButton *mon_abort_button;
|
||||||
QPushButton *mon_monitor_button;
|
QPushButton *mon_monitor_button;
|
||||||
|
bool mon_monitor_state;
|
||||||
QPalette *mon_monitor_palette;
|
QPalette *mon_monitor_palette;
|
||||||
RDPlayMeter *mon_left_meter;
|
RDPlayMeter *mon_left_meter;
|
||||||
RDPlayMeter *mon_right_meter;
|
RDPlayMeter *mon_right_meter;
|
||||||
@ -80,5 +76,5 @@ class DeckMon : public RDFrame
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // DECKMON_H
|
||||||
|
|
||||||
|
@ -181,10 +181,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
|||||||
catch_monitor_vbox->setSpacing(2);
|
catch_monitor_vbox->setSpacing(2);
|
||||||
catch_monitor_area->setWidget(catch_monitor_vbox);
|
catch_monitor_area->setWidget(catch_monitor_vbox);
|
||||||
|
|
||||||
// QSignalMapper *mapper=new QSignalMapper(this);
|
|
||||||
// connect(mapper,SIGNAL(mapped(int)),this,SLOT(abortData(int)));
|
|
||||||
QSignalMapper *mon_mapper=new QSignalMapper(this);
|
|
||||||
connect(mon_mapper,SIGNAL(mapped(int)),this,SLOT(monitorData(int)));
|
|
||||||
QString sql;
|
QString sql;
|
||||||
RDSqlQuery *q1;
|
RDSqlQuery *q1;
|
||||||
sql=QString("select `NAME`,`IPV4_ADDRESS` from `STATIONS` where ")+
|
sql=QString("select `NAME`,`IPV4_ADDRESS` from `STATIONS` where ")+
|
||||||
@ -196,18 +192,12 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
|||||||
SIGNAL(statusChanged(int,unsigned,RDDeck::Status,int,const QString &)),
|
SIGNAL(statusChanged(int,unsigned,RDDeck::Status,int,const QString &)),
|
||||||
this,
|
this,
|
||||||
SLOT(statusChangedData(int,unsigned,RDDeck::Status,int,const QString &)));
|
SLOT(statusChangedData(int,unsigned,RDDeck::Status,int,const QString &)));
|
||||||
connect(catch_connect.back()->connector(),
|
|
||||||
SIGNAL(monitorChanged(int,unsigned,bool)),
|
|
||||||
this,SLOT(monitorChangedData(int,unsigned,bool)));
|
|
||||||
connect(catch_connect.back()->connector(),
|
connect(catch_connect.back()->connector(),
|
||||||
SIGNAL(connected(int,bool)),
|
SIGNAL(connected(int,bool)),
|
||||||
this,SLOT(connectedData(int,bool)));
|
this,SLOT(connectedData(int,bool)));
|
||||||
connect(catch_connect.back()->connector(),
|
connect(catch_connect.back()->connector(),
|
||||||
SIGNAL(meterLevel(int,int,int,int)),
|
SIGNAL(meterLevel(int,int,int,int)),
|
||||||
this,SLOT(meterLevelData(int,int,int,int)));
|
this,SLOT(meterLevelData(int,int,int,int)));
|
||||||
connect(catch_connect.back()->connector(),
|
|
||||||
SIGNAL(heartbeatFailed(int)),
|
|
||||||
this,SLOT(heartbeatFailedData(int)));
|
|
||||||
catch_connect.back()->connector()->
|
catch_connect.back()->connector()->
|
||||||
connectHost(q->value(1).toString(),RDCATCHD_TCP_PORT,
|
connectHost(q->value(1).toString(),RDCATCHD_TCP_PORT,
|
||||||
rda->config()->password());
|
rda->config()->password());
|
||||||
@ -239,10 +229,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
|||||||
(rda->config()->stationName().toLower()==
|
(rda->config()->stationName().toLower()==
|
||||||
q->value(0).toString().toLower()));
|
q->value(0).toString().toLower()));
|
||||||
catch_monitor.back()->deckMon()->show();
|
catch_monitor.back()->deckMon()->show();
|
||||||
mon_mapper->setMapping(catch_monitor.back()->deckMon(),
|
|
||||||
catch_monitor.size()-1);
|
|
||||||
connect(catch_monitor.back()->deckMon(),SIGNAL(monitorClicked()),
|
|
||||||
mon_mapper,SLOT(map()));
|
|
||||||
}
|
}
|
||||||
delete q1;
|
delete q1;
|
||||||
}
|
}
|
||||||
@ -761,16 +747,6 @@ void MainWidget::statusChangedData(int serial,unsigned chan,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::monitorChangedData(int serial,unsigned chan,bool state)
|
|
||||||
{
|
|
||||||
// printf("monitorChangedData(%d,%u,%d)\n",serial,chan,state);
|
|
||||||
int mon=GetMonitor(serial,chan);
|
|
||||||
if(mon>=0) {
|
|
||||||
catch_monitor[mon]->deckMon()->setMonitor(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::catchEventReceivedData(RDCatchEvent *evt)
|
void MainWidget::catchEventReceivedData(RDCatchEvent *evt)
|
||||||
{
|
{
|
||||||
// printf("catchEventReceivedData()\n");
|
// printf("catchEventReceivedData()\n");
|
||||||
@ -789,6 +765,8 @@ void MainWidget::catchEventReceivedData(RDCatchEvent *evt)
|
|||||||
case RDCatchEvent::DeckEventProcessedOp:
|
case RDCatchEvent::DeckEventProcessedOp:
|
||||||
case RDCatchEvent::DeckStatusQueryOp:
|
case RDCatchEvent::DeckStatusQueryOp:
|
||||||
case RDCatchEvent::StopDeckOp:
|
case RDCatchEvent::StopDeckOp:
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
case RDCatchEvent::NullOp:
|
case RDCatchEvent::NullOp:
|
||||||
case RDCatchEvent::LastOp:
|
case RDCatchEvent::LastOp:
|
||||||
break;
|
break;
|
||||||
@ -942,13 +920,6 @@ void MainWidget::meterLevelData(int serial,int deck,int l_r,int level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::monitorData(int id)
|
|
||||||
{
|
|
||||||
catch_connect[catch_monitor[id]->serialNumber()]->connector()->
|
|
||||||
toggleMonitor(catch_monitor[id]->channelNumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::selectionChangedData(const QItemSelection &before,
|
void MainWidget::selectionChangedData(const QItemSelection &before,
|
||||||
const QItemSelection &after)
|
const QItemSelection &after)
|
||||||
{
|
{
|
||||||
@ -1000,17 +971,6 @@ void MainWidget::eventUpdatedData(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::heartbeatFailedData(int id)
|
|
||||||
{
|
|
||||||
if(!catch_host_warnings) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QString msg=tr("Control connection timed out to host")+
|
|
||||||
" `"+catch_connect[id]->stationName()+"'?";
|
|
||||||
QMessageBox::warning(this,"RDCatch - "+tr("Connection Error"),msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::quitMainWidget()
|
void MainWidget::quitMainWidget()
|
||||||
{
|
{
|
||||||
catch_db->removeDatabase(rda->config()->mysqlDbname());
|
catch_db->removeDatabase(rda->config()->mysqlDbname());
|
||||||
|
@ -81,8 +81,6 @@ class MainWidget : public RDMainWindow
|
|||||||
void ripcUserData();
|
void ripcUserData();
|
||||||
void statusChangedData(int,unsigned,RDDeck::Status,int,
|
void statusChangedData(int,unsigned,RDDeck::Status,int,
|
||||||
const QString &cutname);
|
const QString &cutname);
|
||||||
void monitorChangedData(int serial,unsigned chan,bool state);
|
|
||||||
// void deckEventSentData(int serial,int chan,int number);
|
|
||||||
void catchEventReceivedData(RDCatchEvent *evt);
|
void catchEventReceivedData(RDCatchEvent *evt);
|
||||||
void scrollButtonData();
|
void scrollButtonData();
|
||||||
void reportsButtonData();
|
void reportsButtonData();
|
||||||
@ -93,8 +91,6 @@ class MainWidget : public RDMainWindow
|
|||||||
void playedData(int);
|
void playedData(int);
|
||||||
void playStoppedData(int);
|
void playStoppedData(int);
|
||||||
void meterLevelData(int,int,int,int);
|
void meterLevelData(int,int,int,int);
|
||||||
// void abortData(int);
|
|
||||||
void monitorData(int);
|
|
||||||
void selectionChangedData(const QItemSelection &before,
|
void selectionChangedData(const QItemSelection &before,
|
||||||
const QItemSelection &after);
|
const QItemSelection &after);
|
||||||
void doubleClickedData(const QModelIndex &index);
|
void doubleClickedData(const QModelIndex &index);
|
||||||
@ -103,7 +99,6 @@ class MainWidget : public RDMainWindow
|
|||||||
void clockData();
|
void clockData();
|
||||||
void midnightData();
|
void midnightData();
|
||||||
void eventUpdatedData(int id);
|
void eventUpdatedData(int id);
|
||||||
void heartbeatFailedData(int id);
|
|
||||||
void quitMainWidget();
|
void quitMainWidget();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -455,6 +455,8 @@ void MainObject::catchEventReceivedData(RDCatchEvent *evt)
|
|||||||
rda->syslog(LOG_NOTICE,"catchEventReceivedData(): %s",
|
rda->syslog(LOG_NOTICE,"catchEventReceivedData(): %s",
|
||||||
evt->dump().toUtf8().constData());
|
evt->dump().toUtf8().constData());
|
||||||
|
|
||||||
|
RDCatchEvent *resp=NULL;
|
||||||
|
|
||||||
switch(evt->operation()) {
|
switch(evt->operation()) {
|
||||||
case RDCatchEvent::DeckStatusQueryOp:
|
case RDCatchEvent::DeckStatusQueryOp:
|
||||||
SendFullEventResponse(rda->station()->address());
|
SendFullEventResponse(rda->station()->address());
|
||||||
@ -489,8 +491,37 @@ void MainObject::catchEventReceivedData(RDCatchEvent *evt)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDCatchEvent::SetInputMonitorOp:
|
||||||
|
if((evt->targetHostName()==rda->station()->name())&&
|
||||||
|
(evt->deckChannel()>0)&&(evt->deckChannel()<(MAX_DECKS+1))&&
|
||||||
|
(catch_monitor_port[evt->deckChannel()-1]>=0)) {
|
||||||
|
int chan=evt->deckChannel();
|
||||||
|
if(evt->inputMonitorActive()) {
|
||||||
|
rda->cae()->setPassthroughVolume(catch_record_card[chan-1],
|
||||||
|
catch_record_stream[chan-1],
|
||||||
|
catch_monitor_port[chan-1],0);
|
||||||
|
catch_monitor_state[chan-1]=true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rda->cae()->setPassthroughVolume(catch_record_card[chan-1],
|
||||||
|
catch_record_stream[chan-1],
|
||||||
|
catch_monitor_port[chan-1],
|
||||||
|
RD_MUTE_DEPTH);
|
||||||
|
catch_monitor_state[chan-1]=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
resp=new RDCatchEvent();
|
||||||
|
resp->setOperation(RDCatchEvent::SetInputMonitorResponseOp);
|
||||||
|
resp->setDeckChannel(chan);
|
||||||
|
resp->setInputMonitorActive(catch_monitor_state[chan-1]);
|
||||||
|
rda->ripc()->sendCatchEvent(resp);
|
||||||
|
delete resp;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case RDCatchEvent::DeckEventProcessedOp:
|
case RDCatchEvent::DeckEventProcessedOp:
|
||||||
case RDCatchEvent::DeckStatusResponseOp:
|
case RDCatchEvent::DeckStatusResponseOp:
|
||||||
|
case RDCatchEvent::SetInputMonitorResponseOp:
|
||||||
case RDCatchEvent::NullOp:
|
case RDCatchEvent::NullOp:
|
||||||
case RDCatchEvent::LastOp:
|
case RDCatchEvent::LastOp:
|
||||||
break;
|
break;
|
||||||
@ -1729,12 +1760,12 @@ void MainObject::SendFullEventResponse(const QHostAddress &addr)
|
|||||||
//
|
//
|
||||||
// Decks
|
// Decks
|
||||||
//
|
//
|
||||||
evt->clear();
|
|
||||||
evt->setOperation(RDCatchEvent::DeckStatusResponseOp);
|
|
||||||
for(int i=0;i<MAX_DECKS;i++) {
|
for(int i=0;i<MAX_DECKS;i++) {
|
||||||
//
|
//
|
||||||
// Record Decks
|
// Record Decks
|
||||||
//
|
//
|
||||||
|
evt->clear();
|
||||||
|
evt->setOperation(RDCatchEvent::DeckStatusResponseOp);
|
||||||
evt->setDeckChannel(i+1);
|
evt->setDeckChannel(i+1);
|
||||||
evt->setDeckStatus(catch_record_deck_status[i]);
|
evt->setDeckStatus(catch_record_deck_status[i]);
|
||||||
evt->setEventId(catch_record_id[i]);
|
evt->setEventId(catch_record_id[i]);
|
||||||
@ -1748,9 +1779,17 @@ void MainObject::SendFullEventResponse(const QHostAddress &addr)
|
|||||||
}
|
}
|
||||||
rda->ripc()->sendCatchEvent(evt);
|
rda->ripc()->sendCatchEvent(evt);
|
||||||
|
|
||||||
|
evt->clear();
|
||||||
|
evt->setOperation(RDCatchEvent::SetInputMonitorResponseOp);
|
||||||
|
evt->setDeckChannel(i+1);
|
||||||
|
evt->setInputMonitorActive(catch_monitor_state[i]);
|
||||||
|
rda->ripc()->sendCatchEvent(evt);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Play Decks
|
// Play Decks
|
||||||
//
|
//
|
||||||
|
evt->clear();
|
||||||
|
evt->setOperation(RDCatchEvent::DeckStatusResponseOp);
|
||||||
evt->setDeckChannel(i+129);
|
evt->setDeckChannel(i+129);
|
||||||
evt->setDeckStatus(catch_playout_deck_status[i]);
|
evt->setDeckStatus(catch_playout_deck_status[i]);
|
||||||
evt->setEventId(catch_playout_id[i]);
|
evt->setEventId(catch_playout_id[i]);
|
||||||
@ -1823,7 +1862,7 @@ void MainObject::ParseCommand(int ch)
|
|||||||
|
|
||||||
void MainObject::DispatchCommand(ServerConnection *conn)
|
void MainObject::DispatchCommand(ServerConnection *conn)
|
||||||
{
|
{
|
||||||
int chan;
|
// int chan;
|
||||||
int id;
|
int id;
|
||||||
int event;
|
int event;
|
||||||
int code;
|
int code;
|
||||||
@ -1877,32 +1916,6 @@ void MainObject::DispatchCommand(ServerConnection *conn)
|
|||||||
conn->setMeterEnabled(cmds.at(1).trimmed()!="0");
|
conn->setMeterEnabled(cmds.at(1).trimmed()!="0");
|
||||||
}
|
}
|
||||||
|
|
||||||
if((cmds.at(0)=="MN")&&(cmds.size()==3)) { // Monitor State
|
|
||||||
chan=cmds.at(1).toInt(&ok);
|
|
||||||
if(!ok) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if((chan>0)&&(chan<(MAX_DECKS+1))) {
|
|
||||||
if(catch_monitor_port[chan-1]>=0) {
|
|
||||||
if(cmds.at(2).toInt()!=0) {
|
|
||||||
rda->cae()->setPassthroughVolume(catch_record_card[chan-1],
|
|
||||||
catch_record_stream[chan-1],
|
|
||||||
catch_monitor_port[chan-1],0);
|
|
||||||
catch_monitor_state[chan-1]=true;
|
|
||||||
BroadcastCommand(QString::asprintf("MN %d 1!",chan));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
rda->cae()->setPassthroughVolume(catch_record_card[chan-1],
|
|
||||||
catch_record_stream[chan-1],
|
|
||||||
catch_monitor_port[chan-1],
|
|
||||||
RD_MUTE_DEPTH);
|
|
||||||
catch_monitor_state[chan-1]=false;
|
|
||||||
BroadcastCommand(QString::asprintf("MN %d 0!",chan));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((cmds.at(0)=="SC")&&(cmds.size()>=4)) { // Set Exit Code
|
if((cmds.at(0)=="SC")&&(cmds.size()>=4)) { // Set Exit Code
|
||||||
id=cmds.at(1).toInt(&ok);
|
id=cmds.at(1).toInt(&ok);
|
||||||
if(!ok) {
|
if(!ok) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user