aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/DabMultiplexer.cpp4
-rw-r--r--src/dabOutput/edi/AFPacket.cpp6
-rw-r--r--src/dabOutput/edi/AFPacket.h11
-rw-r--r--src/dabOutput/edi/PFT.cpp12
-rw-r--r--src/dabOutput/edi/PFT.h11
-rw-r--r--src/dabOutput/edi/TagItems.h11
-rw-r--r--src/dabOutput/edi/TagPacket.cpp6
-rw-r--r--src/dabOutput/edi/TagPacket.h12
8 files changed, 34 insertions, 39 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index 4a3234e..1a2b238 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -119,10 +119,6 @@ void DabMultiplexer::set_edi_config(const edi_configuration_t& new_edi_conf)
etiLog.log(info, "EDI set up");
}
- // The TagPacket will then be placed into an AFPacket
- AFPacketiser afPacketiser;
- edi_afPacketiser = afPacketiser;
-
// The AF Packet will be protected with reed-solomon and split in fragments
PFT pft(edi_conf);
edi_pft = pft;
diff --git a/src/dabOutput/edi/AFPacket.cpp b/src/dabOutput/edi/AFPacket.cpp
index a1d39b9..509c3a6 100644
--- a/src/dabOutput/edi/AFPacket.cpp
+++ b/src/dabOutput/edi/AFPacket.cpp
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output.
This implements an AF Packet as defined ETSI TS 102 821.
diff --git a/src/dabOutput/edi/AFPacket.h b/src/dabOutput/edi/AFPacket.h
index 9b189b8..a6fd603 100644
--- a/src/dabOutput/edi/AFPacket.h
+++ b/src/dabOutput/edi/AFPacket.h
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output.
This implements an AF Packet as defined ETSI TS 102 821.
@@ -24,8 +26,7 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _AFPACKET_H_
-#define _AFPACKET_H_
+#pragma once
#include "config.h"
#include <vector>
@@ -54,5 +55,3 @@ class AFPacketiser
bool m_verbose;
};
-#endif
-
diff --git a/src/dabOutput/edi/PFT.cpp b/src/dabOutput/edi/PFT.cpp
index 6bed4c1..62b9f98 100644
--- a/src/dabOutput/edi/PFT.cpp
+++ b/src/dabOutput/edi/PFT.cpp
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output,
Protection, Fragmentation and Transport. (PFT)
@@ -76,7 +78,7 @@ RSBlock PFT::Protect(AFPacket af_packet)
// Create the RS(k+p,k) encoder
const int firstRoot = 1; // Discovered by analysing EDI dump
const int gfPoly = 0x11d;
- const bool reverse = 0;
+ const bool reverse = false;
// The encoding has to be 255, 207 always, because the chunk has to
// be padded at the end, and not at the beginning as libfec would
// do
@@ -218,9 +220,7 @@ std::vector< PFTFragment > PFT::Assemble(AFPacket af_packet)
const size_t zero_pad = enable_RS ?
m_num_chunks * chunk_len - af_packet.size() : 0;
- for (size_t i = 0; i < fragments.size(); i++) {
- const vector<uint8_t>& fragment = fragments[i];
-
+ for (const auto &fragment : fragments) {
// Psync
std::string psync("PF");
std::vector<uint8_t> packet(psync.begin(), psync.end());
diff --git a/src/dabOutput/edi/PFT.h b/src/dabOutput/edi/PFT.h
index 8fb6d94..5e2685e 100644
--- a/src/dabOutput/edi/PFT.h
+++ b/src/dabOutput/edi/PFT.h
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output,
Protection, Fragmentation and Transport. (PFT)
@@ -28,8 +30,7 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _PFT_H_
-#define _PFT_H_
+#pragma once
#include "config.h"
#include <vector>
@@ -104,5 +105,3 @@ class PFT
};
-#endif
-
diff --git a/src/dabOutput/edi/TagItems.h b/src/dabOutput/edi/TagItems.h
index 6a8470b..959a9a4 100644
--- a/src/dabOutput/edi/TagItems.h
+++ b/src/dabOutput/edi/TagItems.h
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2016 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2016
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output.
This defines a few TAG items as defined ETSI TS 102 821 and
@@ -24,8 +26,7 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _TAGITEMS_H_
-#define _TAGITEMS_H_
+#pragma once
#include "config.h"
#include "Eti.h"
@@ -152,5 +153,3 @@ class TagStarDMY : public TagItem
uint32_t length_;
};
-#endif
-
diff --git a/src/dabOutput/edi/TagPacket.cpp b/src/dabOutput/edi/TagPacket.cpp
index 435c071..332a130 100644
--- a/src/dabOutput/edi/TagPacket.cpp
+++ b/src/dabOutput/edi/TagPacket.cpp
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output.
This defines a TAG Packet.
diff --git a/src/dabOutput/edi/TagPacket.h b/src/dabOutput/edi/TagPacket.h
index 5ad1904..41d922c 100644
--- a/src/dabOutput/edi/TagPacket.h
+++ b/src/dabOutput/edi/TagPacket.h
@@ -1,6 +1,8 @@
/*
- Copyright (C) 2013,2014 Matthias P. Braendli
- http://mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://www.opendigitalradio.org
EDI output.
This defines a TAG Packet.
@@ -22,8 +24,7 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _TAGPACKET_H_
-#define _TAGPACKET_H_
+#pragma once
#include "config.h"
#include "TagItems.h"
@@ -33,7 +34,6 @@
#include <stdint.h>
-
// A TagPacket is nothing else than a list of tag items, with an
// Assemble function that puts the bytestream together and adds
// padding such that the total length is a multiple of 8 Bytes.
@@ -51,5 +51,3 @@ class TagPacket
unsigned int m_alignment;
};
-#endif
-