summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMultiplexer.cpp1
-rw-r--r--src/fig/FIG0.cpp1
-rw-r--r--src/fig/FIGCarousel.cpp12
-rw-r--r--src/fig/FIGCarousel.h4
4 files changed, 13 insertions, 5 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index a44f8b2..422f53d 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -633,6 +633,7 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu
// FIB 0 Insertion
bool new_fib0_carousel = m_pt.get("general.new_fib0_carousel", false);
if (new_fib0_carousel) {
+ // TODO update currentframe in rti
fig_carousel.fib0(&etiFrame[index], 30, currentFrame % 4);
}
// Skip creating a block for the else because
diff --git a/src/fig/FIG0.cpp b/src/fig/FIG0.cpp
index 677bb9a..67c462a 100644
--- a/src/fig/FIG0.cpp
+++ b/src/fig/FIG0.cpp
@@ -393,7 +393,6 @@ size_t FIG0_3::fill(uint8_t *buf, size_t max_size)
return max_size - remaining;
}
-
//=========== FIG 0/17 ===========
FIG0_17::FIG0_17(FIGRuntimeInformation *rti) :
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index 0e3742c..7f3721b 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -32,8 +32,12 @@
/**************** FIGCarouselElement ****************/
void FIGCarouselElement::reduce_deadline()
{
-#error "Wrong: deadline should decrement identically for all FIGs"
- deadline -= rate_increment_ms(fig->repetition_rate());
+ deadline -= 24; //ms
+}
+
+void FIGCarouselElement::increase_deadline()
+{
+ deadline += rate_increment_ms(fig->repetition_rate());
std::cerr << "FIG " << fig->name() <<
" deadline: " << deadline << std::endl;
@@ -102,7 +106,7 @@ size_t FIGCarousel::fib0(uint8_t *buf, size_t bufsize, int framephase) {
std::vector<FIGCarouselElement> sorted_figs;
- /* Decrement all deadlines according to the desired repetition rate */
+ /* Decrement all deadlines */
for (auto& fig_el : figs) {
fig_el.reduce_deadline();
@@ -154,6 +158,8 @@ size_t FIGCarousel::fib0(uint8_t *buf, size_t bufsize, int framephase) {
if (written > 0) {
available_size -= written;
buf += written;
+
+ fig_el->increase_deadline();
}
sorted_figs.erase(fig_el);
diff --git a/src/fig/FIGCarousel.h b/src/fig/FIGCarousel.h
index e823bef..f65bd81 100644
--- a/src/fig/FIGCarousel.h
+++ b/src/fig/FIGCarousel.h
@@ -38,9 +38,11 @@
struct FIGCarouselElement {
IFIG* fig;
- int deadline;
+ int deadline; // unit: ms
void reduce_deadline(void);
+
+ void increase_deadline(void);
};
class FIGCarousel {