mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 22:14:45 -04:00
Audio UDP/RTP codec and decimation: REST API updates
This commit is contained in:
@@ -283,6 +283,8 @@ int WebAPIAdapterGUI::instanceAudioGet(
|
||||
outputDevices->back()->setCopyToUdp(outputDeviceInfo.copyToUDP ? 1 : 0);
|
||||
outputDevices->back()->setUdpUsesRtp(outputDeviceInfo.udpUseRTP ? 1 : 0);
|
||||
outputDevices->back()->setUdpChannelMode((int) outputDeviceInfo.udpChannelMode);
|
||||
outputDevices->back()->setUdpChannelCodec((int) outputDeviceInfo.udpChannelCodec);
|
||||
outputDevices->back()->setUdpDecimationFactor((int) outputDeviceInfo.udpDecimationFactor);
|
||||
*outputDevices->back()->getUdpAddress() = outputDeviceInfo.udpAddress;
|
||||
outputDevices->back()->setUdpPort(outputDeviceInfo.udpPort);
|
||||
|
||||
@@ -301,6 +303,8 @@ int WebAPIAdapterGUI::instanceAudioGet(
|
||||
outputDevices->back()->setCopyToUdp(outputDeviceInfo.copyToUDP ? 1 : 0);
|
||||
outputDevices->back()->setUdpUsesRtp(outputDeviceInfo.udpUseRTP ? 1 : 0);
|
||||
outputDevices->back()->setUdpChannelMode((int) outputDeviceInfo.udpChannelMode);
|
||||
outputDevices->back()->setUdpChannelCodec((int) outputDeviceInfo.udpChannelCodec);
|
||||
outputDevices->back()->setUdpDecimationFactor((int) outputDeviceInfo.udpDecimationFactor);
|
||||
*outputDevices->back()->getUdpAddress() = outputDeviceInfo.udpAddress;
|
||||
outputDevices->back()->setUdpPort(outputDeviceInfo.udpPort);
|
||||
}
|
||||
@@ -371,7 +375,13 @@ int WebAPIAdapterGUI::instanceAudioOutputPatch(
|
||||
outputDeviceInfo.udpUseRTP = response.getUdpUsesRtp() == 0 ? 0 : 1;
|
||||
}
|
||||
if (audioOutputKeys.contains("udpChannelMode")) {
|
||||
outputDeviceInfo.udpChannelMode = static_cast<AudioOutput::UDPChannelMode>(response.getUdpChannelMode() % 4);
|
||||
outputDeviceInfo.udpChannelMode = static_cast<AudioOutput::UDPChannelMode>(response.getUdpChannelMode());
|
||||
}
|
||||
if (audioOutputKeys.contains("udpChannelCodec")) {
|
||||
outputDeviceInfo.udpChannelCodec = static_cast<AudioOutput::UDPChannelCodec>(response.getUdpChannelCodec());
|
||||
}
|
||||
if (audioOutputKeys.contains("udpDecimatiobFactor")) {
|
||||
outputDeviceInfo.udpDecimationFactor = response.getUdpDecimationFactor();
|
||||
}
|
||||
if (audioOutputKeys.contains("udpAddress")) {
|
||||
outputDeviceInfo.udpAddress = *response.getUdpAddress();
|
||||
@@ -386,7 +396,9 @@ int WebAPIAdapterGUI::instanceAudioOutputPatch(
|
||||
response.setSampleRate(outputDeviceInfo.sampleRate);
|
||||
response.setCopyToUdp(outputDeviceInfo.copyToUDP == 0 ? 0 : 1);
|
||||
response.setUdpUsesRtp(outputDeviceInfo.udpUseRTP == 0 ? 0 : 1);
|
||||
response.setUdpChannelMode(outputDeviceInfo.udpChannelMode % 4);
|
||||
response.setUdpChannelMode(outputDeviceInfo.udpChannelMode);
|
||||
response.setUdpChannelCodec(outputDeviceInfo.udpChannelCodec);
|
||||
response.setUdpDecimationFactor(outputDeviceInfo.udpDecimationFactor);
|
||||
|
||||
if (response.getUdpAddress()) {
|
||||
*response.getUdpAddress() = outputDeviceInfo.udpAddress;
|
||||
@@ -444,7 +456,9 @@ int WebAPIAdapterGUI::instanceAudioOutputDelete(
|
||||
response.setSampleRate(outputDeviceInfo.sampleRate);
|
||||
response.setCopyToUdp(outputDeviceInfo.copyToUDP == 0 ? 0 : 1);
|
||||
response.setUdpUsesRtp(outputDeviceInfo.udpUseRTP == 0 ? 0 : 1);
|
||||
response.setUdpChannelMode(outputDeviceInfo.udpChannelMode % 4);
|
||||
response.setUdpChannelMode(outputDeviceInfo.udpChannelMode);
|
||||
response.setUdpChannelCodec(outputDeviceInfo.udpChannelCodec);
|
||||
response.setUdpDecimationFactor(outputDeviceInfo.udpDecimationFactor);
|
||||
|
||||
if (response.getUdpAddress()) {
|
||||
*response.getUdpAddress() = outputDeviceInfo.udpAddress;
|
||||
|
||||
Reference in New Issue
Block a user