summaryrefslogtreecommitdiff
path: root/client/decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/decoder.cc')
-rw-r--r--client/decoder.cc30
1 files changed, 11 insertions, 19 deletions
diff --git a/client/decoder.cc b/client/decoder.cc
index afc09c9..a86dbd6 100644
--- a/client/decoder.cc
+++ b/client/decoder.cc
@@ -30,7 +30,7 @@
#include "transcoder.h"
-#define READ_DV_FROM_FILE
+//#define READ_DV_FROM_FILE
#include "dv.h"
#ifdef READ_DV_FROM_FILE
@@ -191,32 +191,24 @@ bool Decoder::eventFilter(QObject *o, QEvent *e)
return false;
}
-Status Decoder::status()
+std::vector<thread_status_t> Decoder::status()
{
- Status s;
-
- s.server_diskspace = 0xffffffff;
- s.server_diskspace_max = 0xffffffff;
- s.server_load = 0xffffffff;
- s.server_load_max = 0xffffffff;
- s.server_ping_ms = 0xffffffff;
- s.server_fps = -1.0;
+ std::vector<thread_status_t> v;
sendersmutex.lock();
- // Get the server disk status etc.
- if(senders.isEmpty() == false) senders.back()->getServerStatus(&s);
-
- // fprintf(stderr, "Load: %d of %d - ", s.server_load, s.server_load_max);
- // fprintf(stderr, "Space: %d of %d\n", s.server_diskspace, s.server_diskspace_max);
-
- // Read out the queue sizes
QLinkedList<NetworkSender*>::iterator i;
for(i = senders.begin(); i != senders.end(); i++) {
NetworkSender *ns = *i;
- s.queue_sizes.push_back(ns->queueSize());
+
+ // TODO: Cleanup (get both in one call)
+ thread_status_t s;
+ s.queuelen = ns->queueSize();
+ s.fps = ns->getfps();
+
+ v.push_back(s);
}
sendersmutex.unlock();
- return s;
+ return v;
}