From 52e58173271221a051a5bbdda37e6ab0c4938b6b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 22 Jan 2015 14:51:28 -0500 Subject: [PATCH] Fix flags so bitrate scales up properly on GFE 2.2.2 --- .../limelight/nvstream/rtsp/SdpGenerator.java | 52 ++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/rtsp/SdpGenerator.java b/moonlight-common/src/com/limelight/nvstream/rtsp/SdpGenerator.java index 374e5a07..dfb05875 100644 --- a/moonlight-common/src/com/limelight/nvstream/rtsp/SdpGenerator.java +++ b/moonlight-common/src/com/limelight/nvstream/rtsp/SdpGenerator.java @@ -47,37 +47,31 @@ public class SdpGenerator { addSessionAttribute(config, "x-nv-video[0].timeoutLengthMs", "7000"); addSessionAttribute(config, "x-nv-video[0].framesWithInvalidRefThreshold", "0"); - // Adding 100 causes the stream to start at a lower resolution - /*if (sc.getAdaptiveResolutionEnabled()) { - addSessionAttribute(config, "x-nv-vqos[0].bw.flags", "3895"); - } - else*/ { - addSessionAttribute(config, "x-nv-vqos[0].bw.flags", "3895"); - - // Lock the bitrate if we're not scaling resolution so the picture doesn't get too bad - if (sc.getHeight() >= 1080 && sc.getRefreshRate() >= 60) { - if (sc.getBitrate() < 10000) { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); - } - else { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "10000"); - } - } - else if (sc.getHeight() >= 1080 || sc.getRefreshRate() >= 60) { - if (sc.getBitrate() < 7000) { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); - } - else { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "7000"); - } + addSessionAttribute(config, "x-nv-vqos[0].bw.flags", "51"); + + // Lock the bitrate if we're not scaling resolution so the picture doesn't get too bad + if (sc.getHeight() >= 1080 && sc.getRefreshRate() >= 60) { + if (sc.getBitrate() < 10000) { + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); } else { - if (sc.getBitrate() < 3000) { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); - } - else { - addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "3000"); - } + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "10000"); + } + } + else if (sc.getHeight() >= 1080 || sc.getRefreshRate() >= 60) { + if (sc.getBitrate() < 7000) { + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); + } + else { + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "7000"); + } + } + else { + if (sc.getBitrate() < 3000) { + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", ""+sc.getBitrate()); + } + else { + addSessionAttribute(config, "x-nv-vqos[0].bw.minimumBitrate", "3000"); } }