mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-18 14:14:59 +02:00
2022-11-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcatch(1) that broke record and play-out metering. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
9161d9014e
commit
4122764e9d
@ -23610,3 +23610,6 @@
|
||||
'Enable Metering' catch command.
|
||||
2022-11-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed vestigal code for RDCatch control via TCP connection.
|
||||
2022-11-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in rdcatch(1) that broke record and play-out
|
||||
metering.
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <netdb.h>
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
#include <syslog.h>
|
||||
#include <grp.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@ -210,7 +209,7 @@ MainObject::MainObject(QObject *parent)
|
||||
// CAE Connection
|
||||
//
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),
|
||||
this,SLOT(isConnectedData(bool)));
|
||||
this,SLOT(caeConnectedData(bool)));
|
||||
connect(rda->cae(),SIGNAL(recordLoaded(int,int)),
|
||||
this,SLOT(recordLoadedData(int,int)));
|
||||
connect(rda->cae(),SIGNAL(recording(int,int)),
|
||||
@ -795,6 +794,29 @@ void MainObject::engineData(int id)
|
||||
}
|
||||
|
||||
|
||||
void MainObject::caeConnectedData(bool state)
|
||||
{
|
||||
if(state) {
|
||||
QList<int> cards;
|
||||
QString sql=QString("select `CARD_NUMBER` from `DECKS` where ")+
|
||||
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
|
||||
"`CARD_NUMBER`>=0";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
if(!cards.contains(q->value(0).toInt())) {
|
||||
cards.push_back(q->value(0).toInt());
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
rda->cae()->enableMetering(&cards);
|
||||
}
|
||||
if(!state) {
|
||||
rda->syslog(LOG_ERR,"aborting - unable to connect to Core AudioEngine");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainObject::recordLoadedData(int card,int stream)
|
||||
{
|
||||
int deck=GetRecordDeck(card,stream);
|
||||
@ -1163,7 +1185,7 @@ bool MainObject::StartRecording(int event)
|
||||
str=rml->toString();
|
||||
rda->ripc()->sendRml(rml);
|
||||
rda->syslog(LOG_INFO,"sending switcher command: \"%s\"",
|
||||
(const char *)str.toUtf8());
|
||||
str.toUtf8().constData());
|
||||
delete rml;
|
||||
}
|
||||
|
||||
@ -2020,7 +2042,6 @@ void MainObject::WriteExitCode(int event,RDRecording::ExitCode code,
|
||||
QString::asprintf("`EXIT_CODE`=%d,",code)+
|
||||
"`EXIT_TEXT`='"+RDEscapeString(err_text)+"' where "+
|
||||
QString::asprintf("`ID`=%d",catch_events[event].id());
|
||||
rda->syslog(LOG_NOTICE,"WriteExitCode SQL: %s",sql.toUtf8().constData());
|
||||
RDSqlQuery::apply(sql);
|
||||
switch(code) {
|
||||
case RDRecording::Ok:
|
||||
@ -2064,7 +2085,6 @@ void MainObject::WriteExitCode(CatchEvent *ce,RDRecording::ExitCode code,
|
||||
QString::asprintf("`EXIT_CODE`=%d,",code)+
|
||||
"`EXIT_TEXT`='"+RDEscapeString(err_text)+"' where "+
|
||||
QString::asprintf("`ID`=%d",ce->id());
|
||||
rda->syslog(LOG_NOTICE,"WriteExitCode SQL: %s",sql.toUtf8().constData());
|
||||
RDSqlQuery::apply(sql);
|
||||
switch(code) {
|
||||
case RDRecording::Ok:
|
||||
|
@ -65,6 +65,7 @@ class MainObject : public QObject
|
||||
void startTimerData(int id);
|
||||
void offsetTimerData(int id);
|
||||
void engineData(int);
|
||||
void caeConnectedData(bool state);
|
||||
void recordLoadedData(int card,int stream);
|
||||
void recordingData(int card,int stream);
|
||||
void recordStoppedData(int card,int stream);
|
||||
|
Loading…
x
Reference in New Issue
Block a user