mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
Compare commits
2 Commits
bd67d553ea
...
e8041308b1
Author | SHA1 | Date | |
---|---|---|---|
|
e8041308b1 | ||
|
b04d7eb10a |
@ -149,6 +149,9 @@ void RemoteTCPSink::start()
|
|||||||
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
|
m_basebandSink->setBasebandSampleRate(m_basebandSampleRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MsgConfigureRemoteTCPSink* msg = MsgConfigureRemoteTCPSink::create(m_settings, QStringList(), true, true);
|
||||||
|
m_basebandSink->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
updatePublicListing();
|
updatePublicListing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ RemoteTCPSinkBaseband::~RemoteTCPSinkBaseband()
|
|||||||
void RemoteTCPSinkBaseband::reset()
|
void RemoteTCPSinkBaseband::reset()
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
m_inputMessageQueue.clear();
|
||||||
m_sampleFifo.reset();
|
m_sampleFifo.reset();
|
||||||
m_sink.init();
|
m_sink.init();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,16 @@ RemoteTCPSinkSettingsDialog::RemoteTCPSinkSettingsDialog(RemoteTCPSinkSettings *
|
|||||||
ui->maxClients->setValue(m_settings->m_maxClients);
|
ui->maxClients->setValue(m_settings->m_maxClients);
|
||||||
ui->timeLimit->setValue(m_settings->m_timeLimit);
|
ui->timeLimit->setValue(m_settings->m_timeLimit);
|
||||||
ui->maxSampleRate->setValue(m_settings->m_maxSampleRate);
|
ui->maxSampleRate->setValue(m_settings->m_maxSampleRate);
|
||||||
|
if (m_settings->m_protocol == RemoteTCPSinkSettings::RTL0)
|
||||||
|
{
|
||||||
|
ui->iqOnly->setChecked(true);
|
||||||
|
ui->iqOnlyLabel->setEnabled(false);
|
||||||
|
ui->iqOnly->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ui->iqOnly->setChecked(m_settings->m_iqOnly);
|
ui->iqOnly->setChecked(m_settings->m_iqOnly);
|
||||||
|
}
|
||||||
|
|
||||||
ui->compressor->setCurrentIndex((int) m_settings->m_compression);
|
ui->compressor->setCurrentIndex((int) m_settings->m_compression);
|
||||||
ui->compressionLevel->setValue(m_settings->m_compressionLevel);
|
ui->compressionLevel->setValue(m_settings->m_compressionLevel);
|
||||||
@ -40,6 +49,9 @@ RemoteTCPSinkSettingsDialog::RemoteTCPSinkSettingsDialog(RemoteTCPSinkSettings *
|
|||||||
|
|
||||||
ui->certificate->setText(m_settings->m_certificate);
|
ui->certificate->setText(m_settings->m_certificate);
|
||||||
ui->key->setText(m_settings->m_key);
|
ui->key->setText(m_settings->m_key);
|
||||||
|
if (m_settings->m_protocol != RemoteTCPSinkSettings::SDRA_WSS) {
|
||||||
|
ui->sslSettingsGroup->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
ui->publicListing->setChecked(m_settings->m_public);
|
ui->publicListing->setChecked(m_settings->m_public);
|
||||||
ui->publicAddress->setText(m_settings->m_publicAddress);
|
ui->publicAddress->setText(m_settings->m_publicAddress);
|
||||||
@ -94,11 +106,14 @@ void RemoteTCPSinkSettingsDialog::accept()
|
|||||||
m_settings->m_maxSampleRate = ui->maxSampleRate->value();
|
m_settings->m_maxSampleRate = ui->maxSampleRate->value();
|
||||||
m_settingsKeys.append("maxSampleRate");
|
m_settingsKeys.append("maxSampleRate");
|
||||||
}
|
}
|
||||||
|
if (m_settings->m_protocol != RemoteTCPSinkSettings::RTL0)
|
||||||
|
{
|
||||||
if (ui->iqOnly->isChecked() != m_settings->m_iqOnly)
|
if (ui->iqOnly->isChecked() != m_settings->m_iqOnly)
|
||||||
{
|
{
|
||||||
m_settings->m_iqOnly = ui->iqOnly->isChecked();
|
m_settings->m_iqOnly = ui->iqOnly->isChecked();
|
||||||
m_settingsKeys.append("iqOnly");
|
m_settingsKeys.append("iqOnly");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
RemoteTCPSinkSettings::Compressor compressor = (RemoteTCPSinkSettings::Compressor) ui->compressor->currentIndex();
|
RemoteTCPSinkSettings::Compressor compressor = (RemoteTCPSinkSettings::Compressor) ui->compressor->currentIndex();
|
||||||
if (compressor != m_settings->m_compression)
|
if (compressor != m_settings->m_compression)
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ void RemoteTCPSinkSink::processOneSample(Complex &ci)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC))
|
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
|
||||||
{
|
{
|
||||||
// Compress using FLAC
|
// Compress using FLAC
|
||||||
FLAC__int32 iqBuf[2];
|
FLAC__int32 iqBuf[2];
|
||||||
@ -360,7 +360,7 @@ void RemoteTCPSinkSink::processOneSample(Complex &ci)
|
|||||||
int bytes = 2 * m_settings.m_sampleBits / 8;
|
int bytes = 2 * m_settings.m_sampleBits / 8;
|
||||||
m_bytesUncompressed += bytes;
|
m_bytesUncompressed += bytes;
|
||||||
|
|
||||||
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::ZLIB))
|
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::ZLIB) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
|
||||||
{
|
{
|
||||||
if (m_zStreamInitialised)
|
if (m_zStreamInitialised)
|
||||||
{
|
{
|
||||||
@ -1027,12 +1027,12 @@ void RemoteTCPSinkSink::acceptConnection(Socket *client)
|
|||||||
client->flush();
|
client->flush();
|
||||||
|
|
||||||
// Inform client if they are in a queue
|
// Inform client if they are in a queue
|
||||||
if (!m_settings.m_iqOnly && (m_clients.size() > m_settings.m_maxClients)) {
|
if (!m_settings.m_iqOnly && (m_clients.size() > m_settings.m_maxClients) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0)) {
|
||||||
sendQueuePosition(client, m_clients.size() - m_settings.m_maxClients);
|
sendQueuePosition(client, m_clients.size() - m_settings.m_maxClients);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send existing FLAC header to new client
|
// Send existing FLAC header to new client
|
||||||
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_flacHeader.size() == m_flacHeaderSize))
|
if (!m_settings.m_iqOnly && (m_settings.m_compression == RemoteTCPSinkSettings::FLAC) && (m_flacHeader.size() == m_flacHeaderSize) && (m_settings.m_protocol != RemoteTCPSinkSettings::RTL0))
|
||||||
{
|
{
|
||||||
char header[1+4];
|
char header[1+4];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user