diff --git a/ChangeLog b/ChangeLog index 81a72112..06ebf3ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21168,3 +21168,5 @@ * Removed the 'Q3CString' dependency from 'RDWaveFile'. 2021-02-15 Fred Gleason * Removed the 'Q3Signal' dependency from 'RDCut'. +2021-02-17 Fred Gleason + * Removed the Q3SocketDevice dependency for metering data 'RDCae'. diff --git a/lib/rdcae.cpp b/lib/rdcae.cpp index 30ff95f0..30a951b8 100644 --- a/lib/rdcae.cpp +++ b/lib/rdcae.cpp @@ -2,7 +2,7 @@ // // Connection to the Rivendell Core Audio Engine // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -18,23 +18,17 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include +#include #include +#include #include #include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include +#include "rdapplication.h" +#include "rdcae.h" +#include "rddb.h" +#include "rddebug.h" +#include "rdescape_string.h" RDCae::RDCae(RDStation *station,RDConfig *config,QObject *parent) : QObject(parent) @@ -54,10 +48,9 @@ RDCae::RDCae(RDStation *station,RDConfig *config,QObject *parent) // // Meter Connection // - cae_meter_socket=new Q3SocketDevice(Q3SocketDevice::Datagram); - cae_meter_socket->setBlocking(false); + cae_meter_socket=new QUdpSocket(this); for(Q_INT16 i=30000;i<30100;i++) { - if(cae_meter_socket->bind(QHostAddress(),i)) { + if(cae_meter_socket->bind(i)) { i=31000; } } @@ -125,7 +118,7 @@ void RDCae::connectHost() void RDCae::enableMetering(QList *cards) { - QString cmd=QString().sprintf("ME %u",cae_meter_socket->port()); + QString cmd=QString().sprintf("ME %u",cae_meter_socket->localPort()); for(int i=0;isize();i++) { if(cards->at(i)>=0) { bool found=false; @@ -642,7 +635,7 @@ void RDCae::UpdateMeters() int n; QStringList args; - while((n=cae_meter_socket->readBlock(msg,1500))>0) { + while((n=cae_meter_socket->readDatagram(msg,1500))>0) { msg[n]=0; args=QString(msg).split(" "); if(args[0]=="ML") { diff --git a/lib/rdcae.h b/lib/rdcae.h index f86eeff3..697b2f5e 100644 --- a/lib/rdcae.h +++ b/lib/rdcae.h @@ -2,7 +2,7 @@ // // Connection to the Rivendell Core Audio Engine // -// (C) Copyright 2002-2016 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -112,7 +112,7 @@ class RDCae : public QObject bool input_status[RD_MAX_CARDS][RD_MAX_PORTS]; int cae_handle[RD_MAX_CARDS][RD_MAX_STREAMS]; unsigned cae_pos[RD_MAX_CARDS][RD_MAX_STREAMS]; - Q3SocketDevice *cae_meter_socket; + QUdpSocket *cae_meter_socket; short cae_input_levels[RD_MAX_CARDS][RD_MAX_PORTS][2]; short cae_output_levels[RD_MAX_CARDS][RD_MAX_PORTS][2]; short cae_stream_output_levels[RD_MAX_CARDS][RD_MAX_PORTS][2];