diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Outputs.cpp | 8 | ||||
-rw-r--r-- | src/Outputs.h | 7 | ||||
-rw-r--r-- | src/odr-audioenc.cpp | 5 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/Outputs.cpp b/src/Outputs.cpp index d7af7d4..fd723f6 100644 --- a/src/Outputs.cpp +++ b/src/Outputs.cpp @@ -1,6 +1,6 @@ /* ------------------------------------------------------------------ * Copyright (C) 2011 Martin Storsjo - * Copyright (C) 2020 Matthias P. Braendli + * Copyright (C) 2024 Matthias P. Braendli * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ */ #include "Outputs.h" +#include <chrono> #include <string> #include <stdexcept> #include <cstring> @@ -142,6 +143,11 @@ EDI::EDI() : EDI::~EDI() { } +void EDI::set_verbose(bool verbose) +{ + m_edi_conf.verbose = verbose; +} + void EDI::set_odr_version_tag(const std::string& odr_version_tag) { m_odr_version_tag = odr_version_tag; diff --git a/src/Outputs.h b/src/Outputs.h index 20932d6..3987ca3 100644 --- a/src/Outputs.h +++ b/src/Outputs.h @@ -1,6 +1,6 @@ /* ------------------------------------------------------------------ * Copyright (C) 2011 Martin Storsjo - * Copyright (C) 2020 Matthias P. Braendli + * Copyright (C) 2024 Matthias P. Braendli * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,6 @@ #pragma once #include <vector> -#include <chrono> -#include <deque> #include <cstdint> #include <cstddef> #include <cstdio> @@ -41,7 +39,6 @@ namespace Output { * * Declaration of all outputs */ - class Base { public: virtual ~Base() {}; @@ -133,6 +130,8 @@ class EDI: public Base { EDI& operator=(const EDI&) = delete; virtual ~EDI() override; + void set_verbose(bool verbose); + void set_odr_version_tag(const std::string& odr_version_tag); void add_udp_destination(const std::string& host, unsigned int port); diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 6a2afbe..f65c3e4 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -201,6 +201,7 @@ static void usage(const char* name) " 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" + " --edi-verbose Enable verbose mode for EDI output.\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" " --startup-check=SCRIPT_PATH Before starting, run the given script, and only start if it returns 0.\n" @@ -1412,6 +1413,7 @@ int main(int argc, char *argv[]) {"aaclc", no_argument, 0, 0 }, {"dab", no_argument, 0, 'a'}, {"drift-comp", no_argument, 0, 'D'}, + {"edi-verbose", no_argument, 0, 12 }, {"fifo-silence", no_argument, 0, 3 }, {"help", no_argument, 0, 'h'}, {"level", no_argument, 0, 'l'}, @@ -1505,6 +1507,9 @@ int main(int argc, char *argv[]) case 8: // EDI output FEC audio_enc.edi_output.set_fec(std::stoi(optarg)); break; + case 12: // --edi-verbose + audio_enc.edi_output.set_verbose(true); + break; case 9: // --startup-check startupcheck = optarg; break; |