mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-07 16:36:27 +00:00
Update moonlight-common-c with connection listener and build warning fixes
This commit is contained in:
@@ -7,6 +7,7 @@ public interface NvConnectionListener {
|
||||
|
||||
void connectionStarted();
|
||||
void connectionTerminated(long errorCode);
|
||||
void connectionStatusUpdate(int connectionStatus);
|
||||
|
||||
void displayMessage(String message);
|
||||
void displayTransientMessage(String message);
|
||||
|
||||
@@ -29,6 +29,9 @@ public class MoonBridge {
|
||||
public static final int DR_OK = 0;
|
||||
public static final int DR_NEED_IDR = -1;
|
||||
|
||||
public static final int CONN_STATUS_OKAY = 0;
|
||||
public static final int CONN_STATUS_POOR = 1;
|
||||
|
||||
private static AudioRenderer audioRenderer;
|
||||
private static VideoDecoderRenderer videoRenderer;
|
||||
private static NvConnectionListener connectionListener;
|
||||
@@ -144,24 +147,18 @@ public class MoonBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeClDisplayMessage(String message) {
|
||||
if (connectionListener != null) {
|
||||
connectionListener.displayMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeClDisplayTransientMessage(String message) {
|
||||
if (connectionListener != null) {
|
||||
connectionListener.displayTransientMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeClRumble(short controllerNumber, short lowFreqMotor, short highFreqMotor) {
|
||||
if (connectionListener != null) {
|
||||
connectionListener.rumble(controllerNumber, lowFreqMotor, highFreqMotor);
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeClConnectionStatusUpdate(int connectionStatus) {
|
||||
if (connectionListener != null) {
|
||||
connectionListener.connectionStatusUpdate(connectionStatus);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupBridge(VideoDecoderRenderer videoRenderer, AudioRenderer audioRenderer, NvConnectionListener connectionListener) {
|
||||
MoonBridge.videoRenderer = videoRenderer;
|
||||
MoonBridge.audioRenderer = audioRenderer;
|
||||
|
||||
Reference in New Issue
Block a user