2022-11-29 Fred Gleason <fredg@paravelsystems.com>

* Added a 'SuppressRdcatchMeterUpdates=' directive to '[Hacks]'
	section of rd.conf(5).
	* Fixed a regression in the RDCatch subsystem that caused remote
	deck indication to break.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-11-29 16:41:09 -05:00
parent 54fdd27303
commit 6da25636a4
9 changed files with 55 additions and 39 deletions

View File

@ -23722,3 +23722,8 @@
dump when attempting to print an error message.
2022-11-27 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 4.0.0rc0int2.
2022-11-29 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SuppressRdcatchMeterUpdates=' directive to '[Hacks]'
section of rd.conf(5).
* Fixed a regression in the RDCatch subsystem that caused remote
deck indication to break.

View File

@ -203,3 +203,7 @@ TranscodingDelay=0
;
; Default action is to not save files.
; SaveWebgetFilesDirectory=
; Suppress meter update messages on the notification multicast channel.
;
;SuppressRdcatchMeterUpdates=No

View File

@ -393,6 +393,12 @@ QString RDConfig::saveWebgetFilesDirectory() const
}
bool RDConfig::suppressRdcatchMeterUpdates() const
{
return conf_suppress_rdcatch_meter_updates;
}
int RDConfig::meterBasePort() const
{
return conf_meter_base_port;
@ -615,8 +621,10 @@ bool RDConfig::load()
profile->boolValue("Hacks","DisableMaintChecks",false);
conf_save_webget_files_directory=
profile->stringValue("Hacks","SaveWebgetFilesDirectory");
conf_lock_rdairplay_memory=
profile->boolValue("Hacks","LockRdairplayMemory",false);
conf_disable_maint_checks=
profile->boolValue("Hacks","DisableMaintChecks",false);
conf_suppress_rdcatch_meter_updates=
profile->boolValue("Hacks","SuppressRdcatchMeterUpdates",false);
conf_meter_base_port=
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
conf_meter_port_range=
@ -745,6 +753,7 @@ void RDConfig::clear()
conf_jack_ports[1].clear();
conf_disable_maint_checks=false;
conf_save_webget_files_directory="";
conf_suppress_rdcatch_meter_updates=false;
conf_lock_rdairplay_memory=false;
conf_meter_base_port=RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT;
conf_meter_port_range=RD_METER_SOCKET_PORT_RANGE;

View File

@ -104,6 +104,7 @@ class RDConfig
int meterBasePort() const;
int meterPortRange() const;
QString saveWebgetFilesDirectory() const;
bool suppressRdcatchMeterUpdates() const;
bool enableMixerLogging() const;
uid_t uid() const;
gid_t gid() const;
@ -176,6 +177,7 @@ class RDConfig
bool conf_disable_maint_checks;
bool conf_lock_rdairplay_memory;
QString conf_save_webget_files_directory;
bool conf_suppress_rdcatch_meter_updates;
int conf_meter_base_port;
int conf_meter_port_range;
std::vector<QString> conf_jack_ports[2];

View File

@ -2,7 +2,7 @@
//
// Multi-interface multicast transciever
//
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License
@ -25,6 +25,8 @@
#include <net/if.h>
#include <unistd.h>
#include <QNetworkDatagram>
#include "rdmulticaster.h"
RDMulticaster::RDMulticaster(QObject *parent)
@ -101,18 +103,10 @@ void RDMulticaster::send(const QString &msg,const QHostAddress &m_addr,
void RDMulticaster::readyReadData()
{
struct sockaddr_in sa;
socklen_t sa_len=sizeof(struct sockaddr_in);
char data[1501];
int n;
memset(&sa,0,sizeof(sa));
while((n=recvfrom(multi_socket->socketDescriptor(),data,1500,MSG_DONTWAIT,
(sockaddr *)&sa,&sa_len))>0) {
data[n]=0;
QString msg(data);
emit received(msg,QHostAddress(ntohl(sa.sin_addr.s_addr)));
sa_len=sizeof(struct sockaddr_in);
while(multi_socket->hasPendingDatagrams()) {
QNetworkDatagram dg=multi_socket->receiveDatagram();
printf("emitting: %s",dg.data().constData());
emit received(QString::fromUtf8(dg.data()),dg.senderAddress());
}
}

View File

@ -366,7 +366,7 @@ void MainObject::notificationReceivedData(RDNotification *notify)
void MainObject::catchEventReceivedData(RDCatchEvent *evt)
{
// rda->syslog(LOG_NOTICE,"catchEventReceivedData(): %s",
// evt->dump().toUtf8().constData());
// evt->dump().toUtf8().constData());
RDCatchEvent *resp=NULL;
@ -1030,25 +1030,27 @@ void MainObject::meterData()
short levels[2];
QList<RDCatchMeterLevel> meter_levels;
for(int i=0;i<MAX_DECKS;i++) {
if(catch_record_deck_status[i]==RDDeck::Recording) {
rda->cae()->
inputMeterUpdate(catch_record_card[i],catch_record_stream[i],levels);
meter_levels.push_back(RDCatchMeterLevel(i+1,levels));
if(!rda->config()->suppressRdcatchMeterUpdates()) {
for(int i=0;i<MAX_DECKS;i++) {
if(catch_record_deck_status[i]==RDDeck::Recording) {
rda->cae()->
inputMeterUpdate(catch_record_card[i],catch_record_stream[i],levels);
meter_levels.push_back(RDCatchMeterLevel(i+1,levels));
}
if(catch_playout_deck_status[i]==RDDeck::Recording) {
rda->cae()->
outputMeterUpdate(catch_playout_card[i],catch_playout_port[i],levels);
meter_levels.push_back(RDCatchMeterLevel(i+129,levels));
}
}
if(catch_playout_deck_status[i]==RDDeck::Recording) {
rda->cae()->
outputMeterUpdate(catch_playout_card[i],catch_playout_port[i],levels);
meter_levels.push_back(RDCatchMeterLevel(i+129,levels));
if(meter_levels.size()>0) {
RDCatchEvent *evt=new RDCatchEvent();
evt->setOperation(RDCatchEvent::SendMeterLevelsOp);
evt->setMeterLevels(meter_levels);
rda->ripc()->sendCatchEvent(evt);
delete evt;
}
}
if(meter_levels.size()>0) {
RDCatchEvent *evt=new RDCatchEvent();
evt->setOperation(RDCatchEvent::SendMeterLevelsOp);
evt->setMeterLevels(meter_levels);
rda->ripc()->sendCatchEvent(evt);
delete evt;
}
}

View File

@ -238,8 +238,8 @@ void MainObject::newConnectionData()
void MainObject::notificationReceivedData(const QString &msg,
const QHostAddress &addr)
{
QStringList f0=msg.split(msg,QString::SkipEmptyParts);
if(msg.at(0)=="NOTIFY") {
QStringList f0=msg.split(" ",QString::SkipEmptyParts);
if(f0.at(0)=="NOTIFY") {
RDNotification *notify=new RDNotification();
if(!notify->read(msg)) {
rda->syslog(LOG_INFO,"invalid notification received from %s",
@ -251,7 +251,7 @@ void MainObject::notificationReceivedData(const QString &msg,
BroadcastCommand("ON "+msg+"!");
delete notify;
}
if(msg.at(0)=="CATCH") {
if(f0.at(0)=="CATCH") {
RDCatchEvent *evt=new RDCatchEvent();
if(!evt->read(msg)) {
rda->syslog(LOG_INFO,"invalid catch event received from %s",

View File

@ -1,8 +1,8 @@
// upload_test.cpp
// notification_test.cpp
//
// Test Rivendell file uploading.
// Test Rivendell RDNotification class.
//
// (C) Copyright 2019-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2019-2022 Fred Gleason <fredg@paravelsystems.com>
//
// 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

View File

@ -1,6 +1,6 @@
// upload_test.h
//
// Test Rivendell Notifications
// Test Rivendell RDNotification class
//
// (C) Copyright 2019 Fred Gleason <fredg@paravelsystems.com>
//