From 7f770b27b7caaeb36ffc954e72480b913e46a5d7 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 18 Jul 2018 19:29:52 +0200 Subject: [PATCH] Added support for local variables in MistIn processes, stored in the DTSH header. --- lib/dtsc.h | 1 + lib/dtscmeta.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/dtsc.h b/lib/dtsc.h index 0c58494e..a486c406 100644 --- a/lib/dtsc.h +++ b/lib/dtsc.h @@ -394,6 +394,7 @@ namespace DTSC { long long int bufferWindow; int64_t bootMsOffset;///< Millis to add to packet timestamps to get millis since system boot. std::string sourceURI; + JSON::Value inputLocalVars; }; /// An iterator helper for easily iterating over the parts in a Fragment. diff --git a/lib/dtscmeta.cpp b/lib/dtscmeta.cpp index 17b7d85a..f375f4ec 100644 --- a/lib/dtscmeta.cpp +++ b/lib/dtscmeta.cpp @@ -1491,6 +1491,9 @@ namespace DTSC { moreheader = source.getInt("moreheader"); bootMsOffset = source.getInt("bootoffset"); source.getString("source", sourceURI); + if (source.getScan().hasMember("inputlocalvars")){ + inputLocalVars = source.getScan().getMember("inputlocalvars").asJSON(); + } Scan tmpTracks = source.getScan().getMember("tracks"); unsigned int num = 0; Scan tmpTrack; @@ -2168,6 +2171,9 @@ namespace DTSC { result["source"] = sourceURI; } result["moreheader"] = moreheader; + if (inputLocalVars){ + result["inputlocalvars"] = inputLocalVars; + } return result; }