mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-01 07:15:57 +00:00
Move encryption enablement logic into JNI code
This commit is contained in:
parent
7b13f12817
commit
f7520ba40c
@ -478,7 +478,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
.setAttachedGamepadMask(gamepadMask)
|
||||
.setClientRefreshRateX100((int)(displayRefreshRate * 100))
|
||||
.setAudioConfiguration(prefConfig.audioConfiguration)
|
||||
.setAudioEncryption(true)
|
||||
.setColorSpace(decoderRenderer.getPreferredColorSpace())
|
||||
.setColorRange(decoderRenderer.getPreferredColorRange())
|
||||
.setPersistGamepadsAfterDisconnect(!prefConfig.multiController)
|
||||
|
@ -434,7 +434,6 @@ public class NvConnection {
|
||||
context.streamConfig.getAudioConfiguration().toInt(),
|
||||
context.streamConfig.getSupportedVideoFormats(),
|
||||
context.streamConfig.getClientRefreshRateX100(),
|
||||
context.streamConfig.getEncryptionFlags(),
|
||||
context.riKey.getEncoded(), ib.array(),
|
||||
context.videoCapabilities,
|
||||
context.streamConfig.getColorSpace(),
|
||||
|
@ -108,16 +108,6 @@ public class StreamConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioEncryption(boolean enable) {
|
||||
if (enable) {
|
||||
config.encryptionFlags |= MoonBridge.ENCFLG_AUDIO;
|
||||
}
|
||||
else {
|
||||
config.encryptionFlags &= ~MoonBridge.ENCFLG_AUDIO;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioConfiguration(MoonBridge.AudioConfiguration audioConfig) {
|
||||
config.audioConfiguration = audioConfig;
|
||||
return this;
|
||||
@ -224,10 +214,6 @@ public class StreamConfiguration {
|
||||
return clientRefreshRateX100;
|
||||
}
|
||||
|
||||
public int getEncryptionFlags() {
|
||||
return encryptionFlags;
|
||||
}
|
||||
|
||||
public int getColorRange() {
|
||||
return colorRange;
|
||||
}
|
||||
|
@ -22,10 +22,6 @@ public class MoonBridge {
|
||||
public static final int VIDEO_FORMAT_MASK_AV1 = 0xF000;
|
||||
public static final int VIDEO_FORMAT_MASK_10BIT = 0x2200;
|
||||
|
||||
public static final int ENCFLG_NONE = 0;
|
||||
public static final int ENCFLG_AUDIO = 1;
|
||||
public static final int ENCFLG_ALL = 0xFFFFFFFF;
|
||||
|
||||
public static final int BUFFER_TYPE_PICDATA = 0;
|
||||
public static final int BUFFER_TYPE_SPS = 1;
|
||||
public static final int BUFFER_TYPE_PPS = 2;
|
||||
@ -348,7 +344,6 @@ public class MoonBridge {
|
||||
int bitrate, int packetSize, int streamingRemotely,
|
||||
int audioConfiguration, int supportedVideoFormats,
|
||||
int clientRefreshRateX100,
|
||||
int encryptionFlags,
|
||||
byte[] riAesKey, byte[] riAesIv,
|
||||
int videoCapabilities,
|
||||
int colorSpace, int colorRange);
|
||||
|
@ -434,7 +434,6 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
|
||||
jint bitrate, jint packetSize, jint streamingRemotely,
|
||||
jint audioConfiguration, jint supportedVideoFormats,
|
||||
jint clientRefreshRateX100,
|
||||
jint encryptionFlags,
|
||||
jbyteArray riAesKey, jbyteArray riAesIv,
|
||||
jint videoCapabilities,
|
||||
jint colorSpace, jint colorRange) {
|
||||
@ -455,7 +454,7 @@ Java_com_limelight_nvstream_jni_MoonBridge_startConnection(JNIEnv *env, jclass c
|
||||
.audioConfiguration = audioConfiguration,
|
||||
.supportedVideoFormats = supportedVideoFormats,
|
||||
.clientRefreshRateX100 = clientRefreshRateX100,
|
||||
.encryptionFlags = encryptionFlags,
|
||||
.encryptionFlags = ENCFLG_AUDIO,
|
||||
.colorSpace = colorSpace,
|
||||
.colorRange = colorRange
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user