Update moonlight-common-c with connection listener and build warning fixes

This commit is contained in:
Cameron Gutman
2019-03-20 18:29:56 -07:00
parent 69b175573d
commit 1bffa6bf41
4 changed files with 26 additions and 41 deletions

View File

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

View File

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