From 3f6e1c8768c6fa8caeb41f59af229c8d0057c228 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 7 Apr 2021 15:43:44 +0200 Subject: [PATCH] Added "unixoffset" field to stream info JSON, containing the offset between unix time (in milliseconds) and stream timestamps. --- src/output/output_http_internal.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index 5c699098..fa6a4aec 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -487,6 +487,9 @@ namespace Mist{ json_resp["height"] = (hasVideo ? 480 : 20); } json_resp["type"] = (M.getVod() ? "vod" : "live"); + if (M.getLive()){ + json_resp["unixoffset"] = M.getBootMsOffset() + (Util::unixMS() - Util::bootMS()); + } // show ALL the meta datas! M.toJSON(json_resp["meta"], true);