Add support back for specifying max packet size

This commit is contained in:
Cameron Gutman 2014-11-15 01:23:33 -08:00
parent 67c726a141
commit f21a81d7ac
2 changed files with 10 additions and 1 deletions

View File

@ -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() {

View File

@ -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);