aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-23 08:45:45 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-09-23 08:45:45 +0200
commit72d28f8496bf52dac5bb8c29be0dc4aa5e16fde7 (patch)
tree31e5a68bc1d05b0fda89670b0b3c232b2cb6204d
parente541cdb869535a660f19928e69b9a138b594d079 (diff)
downloadODR-PadEnc-72d28f8496bf52dac5bb8c29be0dc4aa5e16fde7.tar.gz
ODR-PadEnc-72d28f8496bf52dac5bb8c29be0dc4aa5e16fde7.tar.bz2
ODR-PadEnc-72d28f8496bf52dac5bb8c29be0dc4aa5e16fde7.zip
Remove useless skip_if_already_queued arguments
-rw-r--r--src/odr-padenc.cpp24
-rw-r--r--src/odr-padenc.h4
2 files changed, 14 insertions, 14 deletions
diff --git a/src/odr-padenc.cpp b/src/odr-padenc.cpp
index 1d170ca..76439e7 100644
--- a/src/odr-padenc.cpp
+++ b/src/odr-padenc.cpp
@@ -399,9 +399,9 @@ int PadEncoder::CheckRereadFile(const std::string& type, const std::string& path
}
}
-int PadEncoder::EncodeSlide(bool skip_if_already_queued) {
- // skip insertion, if desired and previous one not yet finished
- if (skip_if_already_queued && pad_packetizer.QueueContainsDG(SLSEncoder::APPTYPE_MOT_START)) {
+int PadEncoder::EncodeSlide() {
+ // skip insertion, if previous one not yet finished
+ if (pad_packetizer.QueueContainsDG(SLSEncoder::APPTYPE_MOT_START)) {
fprintf(stderr, "ODR-PadEnc Warning: skipping slide insertion, as previous one still in transmission!\n");
return 0;
}
@@ -453,14 +453,14 @@ int PadEncoder::EncodeSlide(bool skip_if_already_queued) {
return 0;
}
-int PadEncoder::EncodeLabel(bool skip_if_already_queued) {
- // skip insertion, if desired and previous one not yet finished
- if (skip_if_already_queued && pad_packetizer.QueueContainsDG(DLSEncoder::APPTYPE_START)) {
+int PadEncoder::EncodeLabel() {
+ // skip insertion, if previous one not yet finished
+ if (pad_packetizer.QueueContainsDG(DLSEncoder::APPTYPE_START)) {
fprintf(stderr, "ODR-PadEnc Warning: skipping label insertion, as previous one still in transmission!\n");
- return 0;
}
-
- dls_encoder.encodeLabel(options.dls_files[curr_dls_file], options.item_state_file, options.dl_params);
+ else {
+ dls_encoder.encodeLabel(options.dls_files[curr_dls_file], options.item_state_file, options.dl_params);
+ }
return 0;
}
@@ -491,13 +491,13 @@ int PadEncoder::Encode(PadInterface& intf) {
if (options.slide_interval > 0) {
// encode slides regularly
if (pad_timeline >= next_slide) {
- result = EncodeSlide(true);
+ result = EncodeSlide();
next_slide += std::chrono::seconds(options.slide_interval);
}
} else {
// encode slide as soon as previous slide has been transmitted
if (!pad_packetizer.QueueContainsDG(SLSEncoder::APPTYPE_MOT_START))
- result = EncodeSlide(true);
+ result = EncodeSlide();
}
}
if (result)
@@ -533,7 +533,7 @@ int PadEncoder::Encode(PadInterface& intf) {
if (pad_timeline >= next_label_insertion) {
// encode label
- result = EncodeLabel(true);
+ result = EncodeLabel();
next_label_insertion += std::chrono::milliseconds(options.label_insertion);
}
}
diff --git a/src/odr-padenc.h b/src/odr-padenc.h
index 56b48f8..c493d95 100644
--- a/src/odr-padenc.h
+++ b/src/odr-padenc.h
@@ -88,8 +88,8 @@ protected:
steady_clock::time_point next_label_insertion;
size_t xpad_interval_counter;
- int EncodeSlide(bool skip_if_already_queued);
- int EncodeLabel(bool skip_if_already_queued);
+ int EncodeSlide();
+ int EncodeLabel();
static int CheckRereadFile(const std::string& type, const std::string& path);
public: