summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-07 11:51:03 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-07 11:51:03 +0100
commit28d794ab7d47e4f2585ac73f8a69c9c68962b678 (patch)
treee0d7dd92acf20ec5b20ec17c79310412528b66a2
parent7ddaefab49e31a3ff360225b929633e7be161947 (diff)
downloaddabmod-28d794ab7d47e4f2585ac73f8a69c9c68962b678.tar.gz
dabmod-28d794ab7d47e4f2585ac73f8a69c9c68962b678.tar.bz2
dabmod-28d794ab7d47e4f2585ac73f8a69c9c68962b678.zip
Make frame_timestamp movable
-rw-r--r--src/Flowgraph.cpp3
-rw-r--r--src/OutputFile.cpp17
-rw-r--r--src/TimestampDecoder.h16
3 files changed, 14 insertions, 22 deletions
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp
index e12ff1e..ae86417 100644
--- a/src/Flowgraph.cpp
+++ b/src/Flowgraph.cpp
@@ -151,8 +151,9 @@ int Node::process()
meta_vec_t all_input_mds;
for (auto& md_vec_sp : myInputMetadata) {
if (md_vec_sp) {
- copy(md_vec_sp->begin(), md_vec_sp->end(),
+ move(md_vec_sp->begin(), md_vec_sp->end(),
back_inserter(all_input_mds));
+ md_vec_sp->clear();
}
}
diff --git a/src/OutputFile.cpp b/src/OutputFile.cpp
index 1c2f5ed..b7bf59a 100644
--- a/src/OutputFile.cpp
+++ b/src/OutputFile.cpp
@@ -71,21 +71,28 @@ meta_vec_t OutputFile::process_metadata(const meta_vec_t& metadataIn)
{
stringstream ss;
- if (metadataIn.empty()) {
- etiLog.level(debug) << "OutputFile: no mdIn";
- }
-
for (const auto& md : metadataIn) {
if (md.ts) {
ss << " FCT=" << md.ts->fct <<
" FP=" << (int)md.ts->fp;
+ if (md.ts->timestamp_valid) {
+ ss << " TS=" << md.ts->timestamp_sec << ";";
+ }
+ else {
+ ss << " No TS;";
+ }
}
else {
ss << " void, ";
}
}
- etiLog.level(debug) << "Output File got metadata: " << ss.str();
+ if (metadataIn.empty()) {
+ etiLog.level(debug) << "Output File got no mdIn";
+ }
+ else {
+ etiLog.level(debug) << "Output File got metadata: " << ss.str();
+ }
return {};
}
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h
index cffba2f..ff52e4c 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -47,22 +47,6 @@ struct frame_timestamp
bool timestamp_valid = false;
bool timestamp_refresh;
- frame_timestamp() = default;
- frame_timestamp(const frame_timestamp& other) = default;
- frame_timestamp& operator=(const frame_timestamp &rhs)
- {
- if (this != &rhs) {
- this->timestamp_sec = rhs.timestamp_sec;
- this->timestamp_pps = rhs.timestamp_pps;
- this->timestamp_valid = rhs.timestamp_valid;
- this->timestamp_refresh = rhs.timestamp_refresh;
- this->fct = rhs.fct;
- this->fp = rhs.fp;
- }
-
- return *this;
- }
-
frame_timestamp& operator+=(const double& diff)
{
double offset_pps, offset_secs;