Video bandwith and latency only during debugging

This commit is contained in:
Iwan Timmer
2014-10-27 17:48:17 +01:00
parent 0f9477371a
commit cd89fc04e9
4 changed files with 14 additions and 8 deletions

View File

@@ -22,6 +22,8 @@ public abstract class AbstractVideoRenderer implements VideoDecoderRenderer {
private long packets;
private long maxLatency;
public boolean debug;
@Override
public boolean start(final VideoDepacketizer depacketizer) {
last = System.currentTimeMillis();
@@ -43,7 +45,7 @@ public abstract class AbstractVideoRenderer implements VideoDecoderRenderer {
if (latency>maxLatency)
maxLatency = latency;
if (System.currentTimeMillis()>last+2000) {
if (debug && System.currentTimeMillis()>last+2000) {
int bitrate = (dataSize/2)/1024;
System.out.println("Video " + bitrate + "kB/s " + maxLatency + "ms");
maxLatency = 0;