mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Add support for automatic remote streaming detection
This commit is contained in:
parent
bae3b4a6e8
commit
68028242b4
@ -5,7 +5,11 @@ import com.limelight.nvstream.jni.MoonBridge;
|
|||||||
|
|
||||||
public class StreamConfiguration {
|
public class StreamConfiguration {
|
||||||
public static final int INVALID_APP_ID = 0;
|
public static final int INVALID_APP_ID = 0;
|
||||||
|
|
||||||
|
public static final int STREAM_CFG_LOCAL = 0;
|
||||||
|
public static final int STREAM_CFG_REMOTE = 1;
|
||||||
|
public static final int STREAM_CFG_AUTO = 2;
|
||||||
|
|
||||||
private static final int CHANNEL_COUNT_STEREO = 2;
|
private static final int CHANNEL_COUNT_STEREO = 2;
|
||||||
private static final int CHANNEL_COUNT_5_1 = 6;
|
private static final int CHANNEL_COUNT_5_1 = 6;
|
||||||
|
|
||||||
@ -21,7 +25,7 @@ public class StreamConfiguration {
|
|||||||
private boolean enableAdaptiveResolution;
|
private boolean enableAdaptiveResolution;
|
||||||
private boolean playLocalAudio;
|
private boolean playLocalAudio;
|
||||||
private int maxPacketSize;
|
private int maxPacketSize;
|
||||||
private boolean remote;
|
private int remote;
|
||||||
private int audioChannelMask;
|
private int audioChannelMask;
|
||||||
private int audioChannelCount;
|
private int audioChannelCount;
|
||||||
private int audioConfiguration;
|
private int audioConfiguration;
|
||||||
@ -38,7 +42,7 @@ public class StreamConfiguration {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StreamConfiguration.Builder setRemote(boolean remote) {
|
public StreamConfiguration.Builder setRemoteConfiguration(int remote) {
|
||||||
config.remote = remote;
|
config.remote = remote;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -145,6 +149,7 @@ public class StreamConfiguration {
|
|||||||
this.refreshRate = 60;
|
this.refreshRate = 60;
|
||||||
this.bitrate = 10000;
|
this.bitrate = 10000;
|
||||||
this.maxPacketSize = 1024;
|
this.maxPacketSize = 1024;
|
||||||
|
this.remote = STREAM_CFG_AUTO;
|
||||||
this.sops = true;
|
this.sops = true;
|
||||||
this.enableAdaptiveResolution = false;
|
this.enableAdaptiveResolution = false;
|
||||||
this.audioChannelCount = CHANNEL_COUNT_STEREO;
|
this.audioChannelCount = CHANNEL_COUNT_STEREO;
|
||||||
@ -190,7 +195,7 @@ public class StreamConfiguration {
|
|||||||
return playLocalAudio;
|
return playLocalAudio;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getRemote() {
|
public int getRemote() {
|
||||||
return remote;
|
return remote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ public class MoonBridge {
|
|||||||
|
|
||||||
public static native int startConnection(String address, String appVersion, String gfeVersion,
|
public static native int startConnection(String address, String appVersion, String gfeVersion,
|
||||||
int width, int height, int fps,
|
int width, int height, int fps,
|
||||||
int bitrate, int packetSize, boolean streamingRemotely,
|
int bitrate, int packetSize, int streamingRemotely,
|
||||||
int audioConfiguration, boolean supportsHevc,
|
int audioConfiguration, boolean supportsHevc,
|
||||||
boolean enableHdr,
|
boolean enableHdr,
|
||||||
int hevcBitratePercentageMultiplier,
|
int hevcBitratePercentageMultiplier,
|
||||||
|
@ -401,7 +401,7 @@ JNIEXPORT jint JNICALL
|
|||||||
Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass clazz,
|
Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass clazz,
|
||||||
jstring address, jstring appVersion, jstring gfeVersion,
|
jstring address, jstring appVersion, jstring gfeVersion,
|
||||||
jint width, jint height, jint fps,
|
jint width, jint height, jint fps,
|
||||||
jint bitrate, jint packetSize, jboolean streamingRemotely,
|
jint bitrate, jint packetSize, jint streamingRemotely,
|
||||||
jint audioConfiguration, jboolean supportsHevc,
|
jint audioConfiguration, jboolean supportsHevc,
|
||||||
jboolean enableHdr,
|
jboolean enableHdr,
|
||||||
jint hevcBitratePercentageMultiplier,
|
jint hevcBitratePercentageMultiplier,
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 8665d806978d2cba9c9040183a3686f4d87d402c
|
Subproject commit 639ff18dbbcde35ca918c2e898e20bd2a624fdc5
|
Loading…
x
Reference in New Issue
Block a user