Switch from ArrayBlockingQueues to LinkedBlockingQueues for increased throughput. Set thread priorities for the decoder and ping threads.

This commit is contained in:
Cameron Gutman
2013-11-24 19:31:50 -05:00
parent d9527a3810
commit dd82573d08
4 changed files with 17 additions and 12 deletions
@@ -1,7 +1,7 @@
package com.limelight.nvstream.av.video;
import java.util.LinkedList;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import com.limelight.nvstream.av.AvByteBufferDescriptor;
import com.limelight.nvstream.av.AvDecodeUnit;
@@ -26,8 +26,8 @@ public class AvVideoDepacketizer {
private ConnectionStatusListener controlListener;
private static final int DU_LIMIT = 30;
private ArrayBlockingQueue<AvDecodeUnit> decodedUnits = new ArrayBlockingQueue<AvDecodeUnit>(DU_LIMIT);
private static final int DU_LIMIT = 15;
private LinkedBlockingQueue<AvDecodeUnit> decodedUnits = new LinkedBlockingQueue<AvDecodeUnit>(DU_LIMIT);
public AvVideoDepacketizer(ConnectionStatusListener controlListener)
{