mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-04 15:06:08 +00:00
Use LiInterruptConnection to prevent long waits for RTSP timeout
This commit is contained in:
@@ -63,6 +63,9 @@ public class NvConnection {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
// Interrupt any pending connection. This is thread-safe.
|
||||
MoonBridge.interruptConnection();
|
||||
|
||||
// Moonlight-core is not thread-safe with respect to connection start and stop, so
|
||||
// we must not invoke that functionality in parallel.
|
||||
synchronized (MoonBridge.class) {
|
||||
|
||||
@@ -141,6 +141,8 @@ public class MoonBridge {
|
||||
|
||||
public static native void stopConnection();
|
||||
|
||||
public static native void interruptConnection();
|
||||
|
||||
public static native void sendMouseMove(short deltaX, short deltaY);
|
||||
|
||||
public static native void sendMouseButton(byte buttonEvent, byte mouseButton);
|
||||
|
||||
Submodule moonlight-common/src/main/jni/moonlight-core/moonlight-common-c updated: 2d7bf5be82...92951e1309
@@ -45,6 +45,11 @@ Java_com_limelight_nvstream_jni_MoonBridge_stopConnection(JNIEnv *env, jobject c
|
||||
LiStopConnection();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_limelight_nvstream_jni_MoonBridge_interruptConnection(JNIEnv *env, jobject class) {
|
||||
LiInterruptConnection();
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_limelight_nvstream_jni_MoonBridge_getStageName(JNIEnv *env, jobject class, jint stage) {
|
||||
return (*env)->NewStringUTF(env, LiGetStageName(stage));
|
||||
|
||||
Reference in New Issue
Block a user