From a134e7b7118e858e2b81481e58eda0210c6589f3 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 10 Feb 2014 01:00:54 +0100 Subject: [PATCH] Removed some debug message warnings. --- src/buffer/player.cpp | 8 ++++++++ src/connectors/conn_http.cpp | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/buffer/player.cpp b/src/buffer/player.cpp index 9aa75f3c..c19c1e8b 100644 --- a/src/buffer/player.cpp +++ b/src/buffer/player.cpp @@ -117,7 +117,9 @@ int main(int argc, char** argv){ bool meta_sent = false; int playUntil = -1; long long now, prevTimestamp = 0; //for timing of sending packets + #if DEBUG >= DLVL_DEVEL long long bench = 0; //for benchmarking + #endif std::set newSelect; Stats sts; CYG_DEFI @@ -187,7 +189,9 @@ int main(int argc, char** argv){ if (in_out.Received().get().size() >= 2){ playUntil = atoi(in_out.Received().get().substr(2).c_str()); prevTimestamp = 0; + #if DEBUG >= DLVL_DEVEL bench = Util::getMS(); + #endif }else{ playUntil = 0; } @@ -199,7 +203,9 @@ int main(int argc, char** argv){ } ++playing; in_out.setBlocking(false); + #if DEBUG >= DLVL_DEVEL bench = Util::getMS(); + #endif break; } case 'q': { //quit-playing @@ -251,7 +257,9 @@ int main(int argc, char** argv){ playing = 0; } if (playing == 0){ + #if DEBUG >= DLVL_DEVEL DEBUG_MSG(DLVL_DEVEL, "Completed VoD request in MistPlayer (%d ms)", (Util::getMS() - bench)); + #endif pausemark["time"] = source.getJSON()["time"]; pausemark.sendTo(in_out); in_out.setBlocking(true); diff --git a/src/connectors/conn_http.cpp b/src/connectors/conn_http.cpp index ae56354b..37503fd1 100644 --- a/src/connectors/conn_http.cpp +++ b/src/connectors/conn_http.cpp @@ -634,8 +634,11 @@ namespace Connector_HTTP { DEBUG_MSG(DLVL_HIGH, "Received request: %s (%d) => %s (%s)", Client.getUrl().c_str(), conn.getSocket(), handler.c_str(), Client.GetVar("stream").c_str()); #if DEBUG >= DLVL_HIGH long long int startms = Util::getMS(); - #endif long long int midms = 0; + #define MID_BENCH midms = + #else + #define MID_BENCH + #endif bool closeConnection = false; if (Client.GetHeader("Connection") == "close"){ closeConnection = true; @@ -643,12 +646,12 @@ namespace Connector_HTTP { if (handler == "none" || handler == "internal"){ if (handler == "internal"){ - midms = proxyHandleInternal(Client, conn); + MID_BENCH proxyHandleInternal(Client, conn); }else{ - midms = proxyHandleUnsupported(Client, conn); + MID_BENCH proxyHandleUnsupported(Client, conn); } }else{ - midms = proxyHandleThroughConnector(Client, conn, handler); + MID_BENCH proxyHandleThroughConnector(Client, conn, handler); } #if DEBUG >= DLVL_HIGH long long int nowms = Util::getMS();