mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Add support back for specifying max packet size
This commit is contained in:
parent
67c726a141
commit
f21a81d7ac
@ -8,6 +8,7 @@ public class StreamConfiguration {
|
||||
private boolean sops;
|
||||
private boolean enableAdaptiveResolution;
|
||||
private boolean playLocalAudio;
|
||||
private int maxPacketSize;
|
||||
|
||||
public static class Builder {
|
||||
private StreamConfiguration config = new StreamConfiguration();
|
||||
@ -48,6 +49,11 @@ public class StreamConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setMaxPacketSize(int maxPacketSize) {
|
||||
config.maxPacketSize = maxPacketSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration build() {
|
||||
return config;
|
||||
}
|
||||
@ -60,6 +66,7 @@ public class StreamConfiguration {
|
||||
this.height = 720;
|
||||
this.refreshRate = 60;
|
||||
this.bitrate = 10000;
|
||||
this.maxPacketSize = 1024;
|
||||
this.sops = true;
|
||||
this.enableAdaptiveResolution = false;
|
||||
}
|
||||
@ -81,7 +88,7 @@ public class StreamConfiguration {
|
||||
}
|
||||
|
||||
public int getMaxPacketSize() {
|
||||
return 1024;
|
||||
return maxPacketSize;
|
||||
}
|
||||
|
||||
public String getApp() {
|
||||
|
@ -51,6 +51,8 @@ public class SdpGenerator {
|
||||
addSessionAttribute(config, "x-nv-video[0].clientViewportHt", ""+sc.getHeight());
|
||||
addSessionAttribute(config, "x-nv-video[0].maxFPS", ""+sc.getRefreshRate());
|
||||
|
||||
addSessionAttribute(config, "x-nv-video[0].packetSize", ""+sc.getMaxPacketSize());
|
||||
|
||||
addSessionAttributeInt(config, "x-nv-video[0].transferProtocol", 0x41514141);
|
||||
addSessionAttributeInt(config, "x-nv-video[1].transferProtocol", 0x41514141);
|
||||
addSessionAttributeInt(config, "x-nv-video[2].transferProtocol", 0x41514141);
|
||||
|
Loading…
x
Reference in New Issue
Block a user