aboutsummaryrefslogtreecommitdiffstats
path: root/src/dabOutput/edi
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-17 11:22:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-17 11:22:25 +0200
commitbdcf14ca3a83675cfc56f8656e7f7a5ea934ba3a (patch)
tree53324537bd48256882cdd25e2d9c6c7003b47fbc /src/dabOutput/edi
parent5eb98cbc51135264ad0b82e0ba790df17f1d70c6 (diff)
downloaddabmux-bdcf14ca3a83675cfc56f8656e7f7a5ea934ba3a.tar.gz
dabmux-bdcf14ca3a83675cfc56f8656e7f7a5ea934ba3a.tar.bz2
dabmux-bdcf14ca3a83675cfc56f8656e7f7a5ea934ba3a.zip
EDI: add options, fix AF sequence, revision
Diffstat (limited to 'src/dabOutput/edi')
-rw-r--r--src/dabOutput/edi/AFPacket.cpp3
-rw-r--r--src/dabOutput/edi/PFT.cpp2
-rw-r--r--src/dabOutput/edi/PFT.h8
3 files changed, 6 insertions, 7 deletions
diff --git a/src/dabOutput/edi/AFPacket.cpp b/src/dabOutput/edi/AFPacket.cpp
index 3b69f1c..a1d39b9 100644
--- a/src/dabOutput/edi/AFPacket.cpp
+++ b/src/dabOutput/edi/AFPacket.cpp
@@ -39,7 +39,7 @@
#define AFHEADER_PT_TAG 'T'
// AF Packet Major (3 bits) and Minor (4 bits) version
-#define AFHEADER_VERSION 0x8 // MAJ=1, MIN=0
+#define AFHEADER_VERSION 0x10 // MAJ=1, MIN=0
AFPacket AFPacketiser::Assemble(TagPacket tag_packet)
{
@@ -65,6 +65,7 @@ AFPacket AFPacketiser::Assemble(TagPacket tag_packet)
// fill rest of header
packet.push_back(seq >> 8);
packet.push_back(seq & 0xFF);
+ seq++;
packet.push_back((have_crc ? 0x80 : 0) | AFHEADER_VERSION); // ar_cf: CRC=1
packet.push_back(AFHEADER_PT_TAG);
diff --git a/src/dabOutput/edi/PFT.cpp b/src/dabOutput/edi/PFT.cpp
index e1c8249..7f463cc 100644
--- a/src/dabOutput/edi/PFT.cpp
+++ b/src/dabOutput/edi/PFT.cpp
@@ -52,7 +52,7 @@ RSBlock PFT::Protect(AFPacket af_packet)
// number of chunks is ceil(afpacketsize / m_k)
// TS 102 821 7.2.2: c = ceil(l / k_max)
- m_num_chunks = CEIL_DIV(af_packet.size(), 207);
+ m_num_chunks = CEIL_DIV(af_packet.size(), m_k);
if (m_verbose) {
fprintf(stderr, "Protect %zu chunks of size %zu\n",
diff --git a/src/dabOutput/edi/PFT.h b/src/dabOutput/edi/PFT.h
index 9c6f7bd..e17d282 100644
--- a/src/dabOutput/edi/PFT.h
+++ b/src/dabOutput/edi/PFT.h
@@ -57,11 +57,9 @@ class PFT
m_verbose(false)
{ }
- PFT(unsigned int RSDataWordLength,
- unsigned int NumRecoverableFragments,
- const edi_configuration_t &conf) :
- m_k(RSDataWordLength),
- m_m(NumRecoverableFragments),
+ PFT(const edi_configuration_t &conf) :
+ m_k(conf.chunk_len),
+ m_m(conf.fec),
m_dest_port(conf.dest_port),
m_pseq(0),
m_verbose(conf.verbose)