mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Lower the maximum RTP queuing delay to 10 ms instead of 40 ms to reduce the number of frames dropped when a packet is lost
This commit is contained in:
parent
5fc438a0be
commit
021cfd1737
@ -25,6 +25,11 @@ public class VideoStream {
|
|||||||
public static final int FIRST_FRAME_TIMEOUT = 5000;
|
public static final int FIRST_FRAME_TIMEOUT = 5000;
|
||||||
public static final int RTP_RECV_BUFFER = 256 * 1024;
|
public static final int RTP_RECV_BUFFER = 256 * 1024;
|
||||||
|
|
||||||
|
// We can't request an IDR frame until the depacketizer knows
|
||||||
|
// that a packet was lost. This timeout bounds the time that
|
||||||
|
// the RTP queue will wait for missing/reordered packets.
|
||||||
|
public static final int MAX_RTP_QUEUE_DELAY_MS = 10;
|
||||||
|
|
||||||
// The ring size MUST be greater than or equal to
|
// The ring size MUST be greater than or equal to
|
||||||
// the maximum number of packets in a fully
|
// the maximum number of packets in a fully
|
||||||
// presentable frame
|
// presentable frame
|
||||||
@ -201,7 +206,7 @@ public class VideoStream {
|
|||||||
VideoPacket ring[] = new VideoPacket[VIDEO_RING_SIZE];
|
VideoPacket ring[] = new VideoPacket[VIDEO_RING_SIZE];
|
||||||
VideoPacket queuedPacket;
|
VideoPacket queuedPacket;
|
||||||
int ringIndex = 0;
|
int ringIndex = 0;
|
||||||
RtpReorderQueue rtpQueue = new RtpReorderQueue();
|
RtpReorderQueue rtpQueue = new RtpReorderQueue(16, MAX_RTP_QUEUE_DELAY_MS);
|
||||||
RtpReorderQueue.RtpQueueStatus queueStatus;
|
RtpReorderQueue.RtpQueueStatus queueStatus;
|
||||||
|
|
||||||
// Preinitialize the ring buffer
|
// Preinitialize the ring buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user