aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Outputs.cpp8
-rw-r--r--src/Outputs.h3
-rw-r--r--src/odr-audioenc.cpp5
3 files changed, 14 insertions, 2 deletions
diff --git a/src/Outputs.cpp b/src/Outputs.cpp
index 27ab365..66335cb 100644
--- a/src/Outputs.cpp
+++ b/src/Outputs.cpp
@@ -155,8 +155,6 @@ void EDI::add_udp_destination(const std::string& host, unsigned int port)
// We cannot carry AF packets over UDP, because they would be too large.
m_edi_conf.enable_pft = true;
-
- // TODO make FEC configurable
}
void EDI::add_tcp_destination(const std::string& host, unsigned int port)
@@ -172,6 +170,12 @@ void EDI::add_tcp_destination(const std::string& host, unsigned int port)
m_edi_conf.dump = false;
}
+void EDI::set_fec(int fec)
+{
+ m_edi_conf.enable_pft = true;
+ m_edi_conf.fec = fec;
+}
+
bool EDI::enabled() const
{
return not m_edi_conf.destinations.empty();
diff --git a/src/Outputs.h b/src/Outputs.h
index 1211841..7184206 100644
--- a/src/Outputs.h
+++ b/src/Outputs.h
@@ -138,6 +138,9 @@ class EDI: public Base {
void add_udp_destination(const std::string& host, unsigned int port);
void add_tcp_destination(const std::string& host, unsigned int port);
+ // Enables PFT layer and sets FEC
+ void set_fec(int fec);
+
void set_tist(bool enable, uint32_t delay_ms);
bool enabled() const;
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index f6b8b94..db3447b 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -197,6 +197,7 @@ static void usage(const char* name)
" If more than one ZMQ output is given, the socket\n"
" will be connected to all listed endpoints.\n"
" -e, --edi=URI EDI output uri, (e.g. 'tcp://localhost:7000')\n"
+ " --fec=FEC Set EDI output FEC\n"
" -T, --timestamp-delay=DELAY_MS Enabled timestamps in EDI (requires TAI clock bulletin download) and\n"
" add a delay (in milliseconds) to the timestamps carried in EDI\n"
" -k, --secret-key=FILE Enable ZMQ encryption with the given secret key.\n"
@@ -1356,6 +1357,7 @@ int main(int argc, char *argv[])
{"dabpsy", required_argument, 0, 5 },
{"device", required_argument, 0, 'd'},
{"edi", required_argument, 0, 'e'},
+ {"fec", required_argument, 0, 8 },
{"timestamp-delay", required_argument, 0, 'T'},
{"decode", required_argument, 0, 6 },
{"format", required_argument, 0, 'f'},
@@ -1467,6 +1469,9 @@ int main(int argc, char *argv[])
return 1;
}
break;
+ case 8: // EDI output FEC
+ audio_enc.edi_output.set_fec(std::stoi(optarg));
+ break;
case 'a':
audio_enc.selected_encoder = encoder_selection_t::toolame_dab;
break;