summaryrefslogtreecommitdiffstats
path: root/src/fig
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-28 20:16:48 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-28 20:16:48 +0100
commitf07e3c8c34218523767f49bb5878d95093a2e904 (patch)
tree80ca7ff6b191d630bf8515c9fd15e3fda342a831 /src/fig
parent5c89c0ec736770c94f97ced8a754c467d8536a09 (diff)
downloaddabmux-f07e3c8c34218523767f49bb5878d95093a2e904.tar.gz
dabmux-f07e3c8c34218523767f49bb5878d95093a2e904.tar.bz2
dabmux-f07e3c8c34218523767f49bb5878d95093a2e904.zip
Increase FIG deadlines
Diffstat (limited to 'src/fig')
-rw-r--r--src/fig/FIG.cpp11
-rw-r--r--src/fig/FIG.h7
-rw-r--r--src/fig/FIGCarousel.cpp34
3 files changed, 36 insertions, 16 deletions
diff --git a/src/fig/FIG.cpp b/src/fig/FIG.cpp
index e21cf00..03f7451 100644
--- a/src/fig/FIG.cpp
+++ b/src/fig/FIG.cpp
@@ -31,11 +31,14 @@ namespace FIC {
int rate_increment_ms(FIG_rate rate)
{
switch (rate) {
+ /* All these values are multiples of 24, so that it is easier to reason
+ * about the behaviour when considering ETI frames of 24ms duration
+ */
case FIG_rate::FIG0_0: return 96; // Is a special case
- case FIG_rate::A: return 100;
- case FIG_rate::A_B: return 200;
- case FIG_rate::B: return 1000;
- case FIG_rate::C: return 10000;
+ case FIG_rate::A: return 240;
+ case FIG_rate::A_B: return 480;
+ case FIG_rate::B: return 2400;
+ case FIG_rate::C: return 24000;
case FIG_rate::D: return 30000;
case FIG_rate::E: return 120000;
}
diff --git a/src/fig/FIG.h b/src/fig/FIG.h
index 8829e68..0316d77 100644
--- a/src/fig/FIG.h
+++ b/src/fig/FIG.h
@@ -47,7 +47,12 @@ class FIGRuntimeInformation {
bool factumAnalyzer;
};
-// Recommended FIG rates according to ETSI TR 101 496-2 Table 3.6.1
+/* Recommended FIG rates according to ETSI TR 101 496-2 Table 3.6.1
+ * Keep in mind that this specification was not updated since DAB+ came out.
+ * The rates that are recommended there cannot be satisfied with a well filled
+ * DAB+ multiplex, and this is the reason the rates have to be reduced compared
+ * to this recommendation.
+ */
enum class FIG_rate {
FIG0_0, /* Special repetition rate for FIG0/0, EN 300 401 Clause 6.4
In any 96 ms period, the FIG 0/0 should be transmitted in a fixed time
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index ec5855f..8c7558a 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -44,7 +44,7 @@ void FIGCarouselElement::reduce_deadline()
deadline -= 24; //ms
if (deadline < 0) {
- etiLog.level(warn) << "Could not respect repetition rate for FIG " <<
+ etiLog.level(debug) << "Could not respect repetition rate for FIG " <<
fig->name() << " (" << deadline << "ms late)";
}
}
@@ -158,10 +158,6 @@ size_t FIGCarousel::write_fibs(
auto& fig = fib_fig.second;
for (auto& fig_el : fig) {
fig_el.reduce_deadline();
-#if CAROUSELDEBUG
- std::cerr << " * " << fig_el.fig->name() <<
- " d:" << fig_el.deadline << std::endl;
-#endif
}
}
@@ -231,6 +227,15 @@ size_t FIGCarousel::carousel(
return left->deadline < right->deadline;
});
+#if CAROUSELDEBUG
+ std::cerr << " ************** FIGs" << std::endl;
+ for (auto& f : sorted_figs) {
+ std::cerr << " FIG" << f->fig->figtype() << "/" <<
+ f->fig->figextension() << " deadline " <<
+ f->deadline << std::endl;
+ }
+#endif
+
/* Data structure to carry FIB */
size_t available_size = bufsize;
@@ -250,8 +255,10 @@ size_t FIGCarousel::carousel(
pbuf += written;
#if CAROUSELDEBUG
- std::cerr << " ****** FIG0/0(special) wrote\t" << written << " bytes"
- << std::endl;
+ if (written) {
+ std::cerr << " ****** FIG0/0(special) wrote\t" << written << " bytes"
+ << std::endl;
+ }
if ( (*fig0_0)->fig->figtype() != 0 or
(*fig0_0)->fig->figextension() != 0 or
@@ -302,10 +309,15 @@ size_t FIGCarousel::carousel(
pbuf += written;
}
#if CAROUSELDEBUG
- std::cerr << " ****** FIG" << fig_el->fig->figtype() << "/" <<
- fig_el->fig->figextension() << " wrote\t" << written <<
- " bytes" << (status.complete_fig_transmitted ? ", complete" :
- ", incomplete") << std::endl;
+ if (written) {
+ std::cerr <<
+ " ** FIB" << fib <<
+ " FIG" << fig_el->fig->figtype() << "/" <<
+ fig_el->fig->figextension() <<
+ " wrote\t" << written << " bytes" <<
+ (status.complete_fig_transmitted ? ", complete" : ", incomplete") <<
+ std::endl;
+ }
#endif
if (status.complete_fig_transmitted) {