mirror of https://github.com/f4exb/sdrangel.git
Plugins: RTP cleanup
This commit is contained in:
parent
ebf3b1fc4b
commit
d67c3adeb4
|
@ -87,11 +87,6 @@ AMDemod::~AMDemod()
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AMDemod::isAudioNetSinkRTPCapable() const
|
|
||||||
{
|
|
||||||
return m_audioNetSink && m_audioNetSink->isRTPCapable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst __attribute__((unused)))
|
void AMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst __attribute__((unused)))
|
||||||
{
|
{
|
||||||
Complex ci;
|
Complex ci;
|
||||||
|
|
|
@ -129,8 +129,6 @@ public:
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAudioNetSinkRTPCapable() const;
|
|
||||||
|
|
||||||
static const QString m_channelIdURI;
|
static const QString m_channelIdURI;
|
||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
|
|
|
@ -103,11 +103,6 @@ NFMDemod::~NFMDemod()
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NFMDemod::isAudioNetSinkRTPCapable() const
|
|
||||||
{
|
|
||||||
return m_audioNetSink && m_audioNetSink->isRTPCapable();
|
|
||||||
}
|
|
||||||
|
|
||||||
float arctan2(Real y, Real x)
|
float arctan2(Real y, Real x)
|
||||||
{
|
{
|
||||||
Real coeff_1 = M_PI / 4;
|
Real coeff_1 = M_PI / 4;
|
||||||
|
@ -436,7 +431,6 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
|
||||||
<< " m_ctcssOn: " << settings.m_ctcssOn
|
<< " m_ctcssOn: " << settings.m_ctcssOn
|
||||||
<< " m_audioMute: " << settings.m_audioMute
|
<< " m_audioMute: " << settings.m_audioMute
|
||||||
<< " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
|
<< " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
|
||||||
<< " m_copyAudioUseRTP: " << settings.m_copyAudioUseRTP
|
|
||||||
<< " m_udpAddress: " << settings.m_udpAddress
|
<< " m_udpAddress: " << settings.m_udpAddress
|
||||||
<< " m_udpPort: " << settings.m_udpPort
|
<< " m_udpPort: " << settings.m_udpPort
|
||||||
<< " force: " << force;
|
<< " force: " << force;
|
||||||
|
@ -501,26 +495,6 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
|
||||||
setSelectedCtcssIndex(settings.m_ctcssIndex);
|
setSelectedCtcssIndex(settings.m_ctcssIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((settings.m_copyAudioUseRTP != m_settings.m_copyAudioUseRTP) || force)
|
|
||||||
{
|
|
||||||
if (settings.m_copyAudioUseRTP)
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkRTP)) {
|
|
||||||
qDebug("NFMDemod::applySettings: set audio sink to RTP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("NFMDemod::applySettings: RTP support for audio sink not available. Fall back too UDP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkUDP)) {
|
|
||||||
qDebug("NFMDemod::applySettings: set audio sink to UDP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("NFMDemod::applySettings: failed to set audio sink to UDP mode");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,9 +554,6 @@ int NFMDemod::webapiSettingsPutPatch(
|
||||||
if (channelSettingsKeys.contains("copyAudioToUDP")) {
|
if (channelSettingsKeys.contains("copyAudioToUDP")) {
|
||||||
settings.m_copyAudioToUDP = response.getNfmDemodSettings()->getCopyAudioToUdp() != 0;
|
settings.m_copyAudioToUDP = response.getNfmDemodSettings()->getCopyAudioToUdp() != 0;
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("copyAudioUseRTP")) {
|
|
||||||
settings.m_copyAudioUseRTP = response.getNfmDemodSettings()->getCopyAudioUseRtp() != 0;
|
|
||||||
}
|
|
||||||
if (channelSettingsKeys.contains("ctcssIndex")) {
|
if (channelSettingsKeys.contains("ctcssIndex")) {
|
||||||
settings.m_ctcssIndex = response.getNfmDemodSettings()->getCtcssIndex();
|
settings.m_ctcssIndex = response.getNfmDemodSettings()->getCtcssIndex();
|
||||||
}
|
}
|
||||||
|
@ -662,7 +633,6 @@ void NFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
|
||||||
response.getNfmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
response.getNfmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||||
response.getNfmDemodSettings()->setAudioSampleRate(settings.m_audioSampleRate);
|
response.getNfmDemodSettings()->setAudioSampleRate(settings.m_audioSampleRate);
|
||||||
response.getNfmDemodSettings()->setCopyAudioToUdp(settings.m_copyAudioToUDP ? 1 : 0);
|
response.getNfmDemodSettings()->setCopyAudioToUdp(settings.m_copyAudioToUDP ? 1 : 0);
|
||||||
response.getNfmDemodSettings()->setCopyAudioUseRtp(settings.m_copyAudioUseRTP ? 1 : 0);
|
|
||||||
response.getNfmDemodSettings()->setCtcssIndex(settings.m_ctcssIndex);
|
response.getNfmDemodSettings()->setCtcssIndex(settings.m_ctcssIndex);
|
||||||
response.getNfmDemodSettings()->setCtcssOn(settings.m_ctcssOn ? 1 : 0);
|
response.getNfmDemodSettings()->setCtcssOn(settings.m_ctcssOn ? 1 : 0);
|
||||||
response.getNfmDemodSettings()->setDeltaSquelch(settings.m_deltaSquelch ? 1 : 0);
|
response.getNfmDemodSettings()->setDeltaSquelch(settings.m_deltaSquelch ? 1 : 0);
|
||||||
|
|
|
@ -163,8 +163,6 @@ public:
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAudioNetSinkRTPCapable() const;
|
|
||||||
|
|
||||||
static const QString m_channelIdURI;
|
static const QString m_channelIdURI;
|
||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
|
|
|
@ -210,12 +210,6 @@ void NFMDemodGUI::on_copyAudioToUDP_toggled(bool checked)
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NFMDemodGUI::on_useRTP_toggled(bool checked)
|
|
||||||
{
|
|
||||||
m_settings.m_copyAudioUseRTP = checked;
|
|
||||||
applySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NFMDemodGUI::on_ctcss_currentIndexChanged(int index)
|
void NFMDemodGUI::on_ctcss_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
m_settings.m_ctcssIndex = index;
|
m_settings.m_ctcssIndex = index;
|
||||||
|
@ -320,10 +314,6 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
||||||
QChar delta = QChar(0x94, 0x03);
|
QChar delta = QChar(0x94, 0x03);
|
||||||
ui->deltaSquelch->setText(delta);
|
ui->deltaSquelch->setText(delta);
|
||||||
|
|
||||||
if (!m_nfmDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
|
@ -402,10 +392,6 @@ void NFMDemodGUI::displaySettings()
|
||||||
|
|
||||||
ui->ctcss->setCurrentIndex(m_settings.m_ctcssIndex);
|
ui->ctcss->setCurrentIndex(m_settings.m_ctcssIndex);
|
||||||
|
|
||||||
if (m_nfmDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->setChecked(m_settings.m_copyAudioUseRTP);
|
|
||||||
}
|
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ private slots:
|
||||||
void on_ctcssOn_toggled(bool checked);
|
void on_ctcssOn_toggled(bool checked);
|
||||||
void on_audioMute_toggled(bool checked);
|
void on_audioMute_toggled(bool checked);
|
||||||
void on_copyAudioToUDP_toggled(bool checked);
|
void on_copyAudioToUDP_toggled(bool checked);
|
||||||
void on_useRTP_toggled(bool checked);
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
|
|
|
@ -53,16 +53,7 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -611,16 +602,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useRTP">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Use RTP protocol for audio copy to UDP</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>R</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -51,7 +51,6 @@ void NFMDemodSettings::resetToDefaults()
|
||||||
m_ctcssIndex = 0;
|
m_ctcssIndex = 0;
|
||||||
m_audioSampleRate = DSPEngine::instance()->getDefaultAudioSampleRate();
|
m_audioSampleRate = DSPEngine::instance()->getDefaultAudioSampleRate();
|
||||||
m_copyAudioToUDP = false;
|
m_copyAudioToUDP = false;
|
||||||
m_copyAudioUseRTP = false;
|
|
||||||
m_udpAddress = "127.0.0.1";
|
m_udpAddress = "127.0.0.1";
|
||||||
m_udpPort = 9998;
|
m_udpPort = 9998;
|
||||||
m_rgbColor = QColor(255, 0, 0).rgb();
|
m_rgbColor = QColor(255, 0, 0).rgb();
|
||||||
|
@ -78,7 +77,6 @@ QByteArray NFMDemodSettings::serialize() const
|
||||||
}
|
}
|
||||||
|
|
||||||
s.writeString(14, m_title);
|
s.writeString(14, m_title);
|
||||||
s.writeBool(15, m_copyAudioUseRTP);
|
|
||||||
|
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
@ -122,7 +120,6 @@ bool NFMDemodSettings::deserialize(const QByteArray& data)
|
||||||
d.readS32(11, &m_squelchGate, 5);
|
d.readS32(11, &m_squelchGate, 5);
|
||||||
d.readBool(12, &m_deltaSquelch, false);
|
d.readBool(12, &m_deltaSquelch, false);
|
||||||
d.readString(14, &m_title, "NFM Demodulator");
|
d.readString(14, &m_title, "NFM Demodulator");
|
||||||
d.readBool(15, &m_copyAudioUseRTP, false);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@ struct NFMDemodSettings
|
||||||
int m_ctcssIndex;
|
int m_ctcssIndex;
|
||||||
uint32_t m_audioSampleRate;
|
uint32_t m_audioSampleRate;
|
||||||
bool m_copyAudioToUDP;
|
bool m_copyAudioToUDP;
|
||||||
bool m_copyAudioUseRTP;
|
|
||||||
QString m_udpAddress;
|
QString m_udpAddress;
|
||||||
uint16_t m_udpPort;
|
uint16_t m_udpPort;
|
||||||
quint32 m_rgbColor;
|
quint32 m_rgbColor;
|
||||||
|
|
|
@ -113,11 +113,6 @@ SSBDemod::~SSBDemod()
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SSBDemod::isAudioNetSinkRTPCapable() const
|
|
||||||
{
|
|
||||||
return m_audioNetSink && m_audioNetSink->isRTPCapable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SSBDemod::configure(MessageQueue* messageQueue,
|
void SSBDemod::configure(MessageQueue* messageQueue,
|
||||||
Real Bandwidth,
|
Real Bandwidth,
|
||||||
Real LowCutoff,
|
Real LowCutoff,
|
||||||
|
@ -396,7 +391,6 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
|
||||||
<< " m_dsb: " << settings.m_dsb
|
<< " m_dsb: " << settings.m_dsb
|
||||||
<< " m_audioMute: " << settings.m_audioMute
|
<< " m_audioMute: " << settings.m_audioMute
|
||||||
<< " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
|
<< " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
|
||||||
<< " m_copyAudioUseRTP: " << settings.m_copyAudioUseRTP
|
|
||||||
<< " m_agcActive: " << settings.m_agc
|
<< " m_agcActive: " << settings.m_agc
|
||||||
<< " m_agcClamping: " << settings.m_agcClamping
|
<< " m_agcClamping: " << settings.m_agcClamping
|
||||||
<< " m_agcTimeLog2: " << settings.m_agcTimeLog2
|
<< " m_agcTimeLog2: " << settings.m_agcTimeLog2
|
||||||
|
@ -496,26 +490,6 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
|
||||||
m_audioNetSink->setDestination(settings.m_udpAddress, settings.m_udpPort);
|
m_audioNetSink->setDestination(settings.m_udpAddress, settings.m_udpPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((settings.m_copyAudioUseRTP != m_settings.m_copyAudioUseRTP) || force)
|
|
||||||
{
|
|
||||||
if (settings.m_copyAudioUseRTP)
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkRTP)) {
|
|
||||||
qDebug("NFMDemod::applySettings: set audio sink to RTP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("NFMDemod::applySettings: RTP support for audio sink not available. Fall back too UDP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkUDP)) {
|
|
||||||
qDebug("NFMDemod::applySettings: set audio sink to UDP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("NFMDemod::applySettings: failed to set audio sink to UDP mode");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_spanLog2 = settings.m_spanLog2;
|
m_spanLog2 = settings.m_spanLog2;
|
||||||
m_audioBinaual = settings.m_audioBinaural;
|
m_audioBinaual = settings.m_audioBinaural;
|
||||||
m_audioFlipChannels = settings.m_audioFlipChannels;
|
m_audioFlipChannels = settings.m_audioFlipChannels;
|
||||||
|
|
|
@ -134,8 +134,6 @@ public:
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAudioNetSinkRTPCapable() const;
|
|
||||||
|
|
||||||
static const QString m_channelIdURI;
|
static const QString m_channelIdURI;
|
||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
|
|
|
@ -203,12 +203,6 @@ void SSBDemodGUI::on_copyAudioToUDP_toggled(bool checked)
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBDemodGUI::on_useRTP_toggled(bool checked)
|
|
||||||
{
|
|
||||||
m_settings.m_copyAudioUseRTP = checked;
|
|
||||||
applySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
|
@ -288,9 +282,6 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceUISet->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
if (!m_ssbDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->hide();
|
|
||||||
}
|
|
||||||
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
|
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
|
||||||
|
|
||||||
|
@ -523,10 +514,6 @@ void SSBDemodGUI::displaySettings()
|
||||||
ui->agcThresholdGateText->setText(s);
|
ui->agcThresholdGateText->setText(s);
|
||||||
ui->copyAudioToUDP->setChecked(m_settings.m_copyAudioToUDP);
|
ui->copyAudioToUDP->setChecked(m_settings.m_copyAudioToUDP);
|
||||||
|
|
||||||
if (m_ssbDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->setChecked(m_settings.m_copyAudioUseRTP);
|
|
||||||
}
|
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,6 @@ private slots:
|
||||||
void on_spanLog2_valueChanged(int value);
|
void on_spanLog2_valueChanged(int value);
|
||||||
void on_flipSidebands_clicked(bool checked);
|
void on_flipSidebands_clicked(bool checked);
|
||||||
void on_copyAudioToUDP_toggled(bool copy);
|
void on_copyAudioToUDP_toggled(bool copy);
|
||||||
void on_useRTP_toggled(bool checked);
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
void tick();
|
void tick();
|
||||||
|
|
|
@ -53,16 +53,7 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -873,16 +864,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useRTP">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Use RTP protocol for audio copy to UDP</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>R</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="audioMute">
|
<widget class="QToolButton" name="audioMute">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -921,16 +902,7 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -45,7 +45,6 @@ void SSBDemodSettings::resetToDefaults()
|
||||||
m_agc = false;
|
m_agc = false;
|
||||||
m_agcClamping = false;
|
m_agcClamping = false;
|
||||||
m_copyAudioToUDP = false;
|
m_copyAudioToUDP = false;
|
||||||
m_copyAudioUseRTP = false;
|
|
||||||
m_agcPowerThreshold = -40;
|
m_agcPowerThreshold = -40;
|
||||||
m_agcThresholdGate = 4;
|
m_agcThresholdGate = 4;
|
||||||
m_agcTimeLog2 = 7;
|
m_agcTimeLog2 = 7;
|
||||||
|
@ -84,7 +83,6 @@ QByteArray SSBDemodSettings::serialize() const
|
||||||
s.writeS32(14, m_agcThresholdGate);
|
s.writeS32(14, m_agcThresholdGate);
|
||||||
s.writeBool(15, m_agcClamping);
|
s.writeBool(15, m_agcClamping);
|
||||||
s.writeString(16, m_title);
|
s.writeString(16, m_title);
|
||||||
s.writeBool(17, m_copyAudioUseRTP);
|
|
||||||
|
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
@ -129,7 +127,6 @@ bool SSBDemodSettings::deserialize(const QByteArray& data)
|
||||||
d.readS32(14, &m_agcThresholdGate, 4);
|
d.readS32(14, &m_agcThresholdGate, 4);
|
||||||
d.readBool(15, &m_agcClamping, false);
|
d.readBool(15, &m_agcClamping, false);
|
||||||
d.readString(16, &m_title, "SSB Demodulator");
|
d.readString(16, &m_title, "SSB Demodulator");
|
||||||
d.readBool(17, &m_copyAudioUseRTP, false);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ struct SSBDemodSettings
|
||||||
bool m_dsb;
|
bool m_dsb;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
bool m_copyAudioToUDP;
|
bool m_copyAudioToUDP;
|
||||||
bool m_copyAudioUseRTP;
|
|
||||||
bool m_agc;
|
bool m_agc;
|
||||||
bool m_agcClamping;
|
bool m_agcClamping;
|
||||||
int m_agcTimeLog2;
|
int m_agcTimeLog2;
|
||||||
|
|
|
@ -88,11 +88,6 @@ WFMDemod::~WFMDemod()
|
||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WFMDemod::isAudioNetSinkRTPCapable() const
|
|
||||||
{
|
|
||||||
return m_audioNetSink && m_audioNetSink->isRTPCapable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst __attribute__((unused)))
|
void WFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst __attribute__((unused)))
|
||||||
{
|
{
|
||||||
Complex ci;
|
Complex ci;
|
||||||
|
@ -334,26 +329,6 @@ void WFMDemod::applySettings(const WFMDemodSettings& settings, bool force)
|
||||||
m_audioNetSink->setDestination(settings.m_udpAddress, settings.m_udpPort);
|
m_audioNetSink->setDestination(settings.m_udpAddress, settings.m_udpPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((settings.m_copyAudioUseRTP != m_settings.m_copyAudioUseRTP) || force)
|
|
||||||
{
|
|
||||||
if (settings.m_copyAudioUseRTP)
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkRTP)) {
|
|
||||||
qDebug("WFMDemod::applySettings: set audio sink to RTP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("WFMDemod::applySettings: RTP support for audio sink not available. Fall back too UDP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_audioNetSink->selectType(AudioNetSink::SinkUDP)) {
|
|
||||||
qDebug("WFMDemod::applySettings: set audio sink to UDP mode");
|
|
||||||
} else {
|
|
||||||
qWarning("WFMDemod::applySettings: failed to set audio sink to UDP mode");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,6 @@ public:
|
||||||
m_magsqCount = 0;
|
m_magsqCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAudioNetSinkRTPCapable() const;
|
|
||||||
|
|
||||||
static const QString m_channelIdURI;
|
static const QString m_channelIdURI;
|
||||||
static const QString m_channelId;
|
static const QString m_channelId;
|
||||||
|
|
||||||
|
|
|
@ -137,12 +137,6 @@ void WFMDemodGUI::on_copyAudioToUDP_toggled(bool checked)
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WFMDemodGUI::on_useRTP_toggled(bool checked)
|
|
||||||
{
|
|
||||||
m_settings.m_copyAudioUseRTP = checked;
|
|
||||||
applySettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WFMDemodGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused)))
|
void WFMDemodGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused)))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -213,10 +207,6 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceUISet->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
if (!m_wfmDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
|
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
|
||||||
|
|
||||||
|
@ -279,10 +269,6 @@ void WFMDemodGUI::displaySettings()
|
||||||
ui->squelch->setValue(m_settings.m_squelch);
|
ui->squelch->setValue(m_settings.m_squelch);
|
||||||
ui->squelchText->setText(QString("%1 dB").arg(m_settings.m_squelch));
|
ui->squelchText->setText(QString("%1 dB").arg(m_settings.m_squelch));
|
||||||
|
|
||||||
if (m_wfmDemod->isAudioNetSinkRTPCapable()) {
|
|
||||||
ui->useRTP->setChecked(m_settings.m_copyAudioUseRTP);
|
|
||||||
}
|
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,6 @@ private slots:
|
||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
void on_audioMute_toggled(bool checked);
|
void on_audioMute_toggled(bool checked);
|
||||||
void on_copyAudioToUDP_toggled(bool copy);
|
void on_copyAudioToUDP_toggled(bool copy);
|
||||||
void on_useRTP_toggled(bool checked);
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
void tick();
|
void tick();
|
||||||
|
|
|
@ -59,16 +59,7 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -384,16 +375,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useRTP">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Use RTP protocol for audio copy to UDP</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>R</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="audioMute">
|
<widget class="QToolButton" name="audioMute">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -44,7 +44,6 @@ void WFMDemodSettings::resetToDefaults()
|
||||||
m_audioMute = false;
|
m_audioMute = false;
|
||||||
m_audioSampleRate = DSPEngine::instance()->getDefaultAudioSampleRate();
|
m_audioSampleRate = DSPEngine::instance()->getDefaultAudioSampleRate();
|
||||||
m_copyAudioToUDP = false;
|
m_copyAudioToUDP = false;
|
||||||
m_copyAudioUseRTP = false;
|
|
||||||
m_udpAddress = "127.0.0.1";
|
m_udpAddress = "127.0.0.1";
|
||||||
m_udpPort = 9999;
|
m_udpPort = 9999;
|
||||||
m_rgbColor = QColor(0, 0, 255).rgb();
|
m_rgbColor = QColor(0, 0, 255).rgb();
|
||||||
|
|
|
@ -32,7 +32,6 @@ struct WFMDemodSettings
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
quint32 m_audioSampleRate;
|
quint32 m_audioSampleRate;
|
||||||
bool m_copyAudioToUDP;
|
bool m_copyAudioToUDP;
|
||||||
bool m_copyAudioUseRTP;
|
|
||||||
QString m_udpAddress;
|
QString m_udpAddress;
|
||||||
quint16 m_udpPort;
|
quint16 m_udpPort;
|
||||||
quint32 m_rgbColor;
|
quint32 m_rgbColor;
|
||||||
|
|
|
@ -37,8 +37,6 @@ NFMDemodSettings:
|
||||||
type: integer
|
type: integer
|
||||||
copyAudioToUDP:
|
copyAudioToUDP:
|
||||||
type: integer
|
type: integer
|
||||||
copyAudioUseRTP:
|
|
||||||
type: integer
|
|
||||||
udpAddress:
|
udpAddress:
|
||||||
type: string
|
type: string
|
||||||
udpPort:
|
udpPort:
|
||||||
|
|
Loading…
Reference in New Issue