changeset 124:4ff643c1eccc

Remove some debug again by default
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 27 Oct 2016 16:14:22 +0100
parents 6b11ca6bb0a3
children ea06fae1567c
files vamp-client/ProcessQtTransport.h
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vamp-client/ProcessQtTransport.h	Thu Oct 27 16:13:57 2016 +0100
+++ b/vamp-client/ProcessQtTransport.h	Thu Oct 27 16:14:22 2016 +0100
@@ -44,6 +44,8 @@
 
 #include <iostream>
 
+//#define DEBUG_TRANSPORT 1
+
 namespace piper_vamp {
 namespace client {
 
@@ -66,7 +68,7 @@
         m_process->setProcessChannelMode(QProcess::ForwardedErrorChannel);
 
         m_process->start(QString::fromStdString(processName),
-                         { "-d", QString::fromStdString(formatArg) });
+                         { QString::fromStdString(formatArg) });
         
         if (!m_process->waitForStarted()) {
             if (m_process->state() == QProcess::NotRunning) {
@@ -95,7 +97,9 @@
                 m_process->waitForFinished(200);
                 m_process->close();
                 m_process->waitForFinished();
+#ifdef DEBUG_TRANSPORT
                 std::cerr << "server exited" << std::endl;
+#endif
             }
             delete m_process;
         }
@@ -121,7 +125,9 @@
             throw std::logic_error("No completeness checker set on transport");
         }
         
+#ifdef DEBUG_TRANSPORT
         std::cerr << "writing " << size << " bytes to server" << std::endl;
+#endif
         m_process->write(ptr, size);
         
         std::vector<char> buffer;
@@ -132,7 +138,9 @@
             qint64 byteCount = m_process->bytesAvailable();
 
             if (!byteCount) {
+#ifdef DEBUG_TRANSPORT
                 std::cerr << "waiting for data from server..." << std::endl;
+#endif
                 m_process->waitForReadyRead(1000);
                 if (m_process->state() == QProcess::NotRunning) {
                     QProcess::ProcessError err = m_process->error();