1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

AM demod: remove UDP copy using RTP

This commit is contained in:
f4exb 2018-03-27 00:57:41 +02:00
parent b7ed963ff7
commit c8a6bb71ba
6 changed files with 0 additions and 54 deletions

View File

@ -277,7 +277,6 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force)
<< " m_audioMute: " << settings.m_audioMute
<< " m_bandpassEnable: " << settings.m_bandpassEnable
<< " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
<< " m_copyAudioUseRTP: " << settings.m_copyAudioUseRTP
<< " m_udpAddress: " << settings.m_udpAddress
<< " m_udpPort: " << settings.m_udpPort
<< " m_audioDeviceName: " << settings.m_audioDeviceName
@ -305,26 +304,6 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force)
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("AMDemod::applySettings: set audio sink to RTP mode");
} else {
qWarning("AMDemod::applySettings: RTP support for audio sink not available. Fall back too UDP");
}
}
else
{
if (m_audioNetSink->selectType(AudioNetSink::SinkUDP)) {
qDebug("AMDemod::applySettings: set audio sink to UDP mode");
} else {
qWarning("AMDemod::applySettings: failed to set audio sink to UDP mode");
}
}
}
if ((settings.m_audioDeviceName != m_settings.m_audioDeviceName) || force)
{
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
@ -388,9 +367,6 @@ int AMDemod::webapiSettingsPutPatch(
if (channelSettingsKeys.contains("copyAudioToUDP")) {
settings.m_copyAudioToUDP = response.getAmDemodSettings()->getCopyAudioToUdp() != 0;
}
if (channelSettingsKeys.contains("copyAudioUseRTP")) {
settings.m_copyAudioUseRTP = response.getAmDemodSettings()->getCopyAudioUseRtp() != 0;
}
if (channelSettingsKeys.contains("inputFrequencyOffset"))
{
settings.m_inputFrequencyOffset = response.getAmDemodSettings()->getInputFrequencyOffset();
@ -457,7 +433,6 @@ void AMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
{
response.getAmDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
response.getAmDemodSettings()->setCopyAudioToUdp(settings.m_copyAudioToUDP ? 1 : 0);
response.getAmDemodSettings()->setCopyAudioUseRtp(settings.m_copyAudioUseRTP ? 1 : 0);
response.getAmDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
response.getAmDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
response.getAmDemodSettings()->setRgbColor(settings.m_rgbColor);

View File

@ -179,12 +179,6 @@ void AMDemodGUI::on_copyAudioToUDP_toggled(bool checked)
applySettings();
}
void AMDemodGUI::on_useRTP_toggled(bool checked)
{
m_settings.m_copyAudioUseRTP = checked;
applySettings();
}
void AMDemodGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused)))
{
/*
@ -257,10 +251,6 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
if (!m_amDemod->isAudioNetSinkRTPCapable()) {
ui->useRTP->hide();
}
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
@ -326,10 +316,6 @@ void AMDemodGUI::displaySettings()
ui->bandpassEnable->setChecked(m_settings.m_bandpassEnable);
ui->copyAudioToUDP->setChecked(m_settings.m_copyAudioToUDP);
if (m_amDemod->isAudioNetSinkRTPCapable()) {
ui->useRTP->setChecked(m_settings.m_copyAudioUseRTP);
}
blockApplySettings(false);
}

View File

@ -72,7 +72,6 @@ private slots:
void on_squelch_valueChanged(int value);
void on_audioMute_toggled(bool checked);
void on_copyAudioToUDP_toggled(bool copy);
void on_useRTP_toggled(bool checked);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void handleInputMessages();

View File

@ -190,16 +190,6 @@
</property>
</widget>
</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>
</item>
<item>

View File

@ -36,7 +36,6 @@ void AMDemodSettings::resetToDefaults()
m_audioMute = false;
m_bandpassEnable = false;
m_copyAudioToUDP = false;
m_copyAudioUseRTP = false;
m_udpAddress = "127.0.0.1";
m_udpPort = 9999;
m_rgbColor = QColor(255, 255, 0).rgb();
@ -59,7 +58,6 @@ QByteArray AMDemodSettings::serialize() const
s.writeU32(7, m_rgbColor);
s.writeBool(8, m_bandpassEnable);
s.writeString(9, m_title);
s.writeBool(10, m_copyAudioUseRTP);
s.writeString(11, m_audioDeviceName);
return s.final();
}
@ -96,7 +94,6 @@ bool AMDemodSettings::deserialize(const QByteArray& data)
d.readU32(7, &m_rgbColor);
d.readBool(8, &m_bandpassEnable, false);
d.readString(9, &m_title, "AM Demodulator");
d.readBool(10, &m_copyAudioUseRTP, false);
d.readString(11, &m_audioDeviceName, AudioDeviceManager::m_defaultDeviceName);
return true;

View File

@ -30,7 +30,6 @@ struct AMDemodSettings
bool m_audioMute;
bool m_bandpassEnable;
bool m_copyAudioToUDP;
bool m_copyAudioUseRTP;
QString m_udpAddress;
quint16 m_udpPort;
quint32 m_rgbColor;