mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-06 16:06:10 +00:00
Allow video decoder capabilities to be set at runtime
This commit is contained in:
@@ -19,4 +19,6 @@ public class ConnectionContext {
|
||||
|
||||
public int negotiatedWidth, negotiatedHeight;
|
||||
public int negotiatedFps;
|
||||
|
||||
public int videoCapabilities;
|
||||
}
|
||||
|
||||
@@ -230,13 +230,15 @@ public class NvConnection {
|
||||
context.negotiatedWidth, context.negotiatedHeight,
|
||||
context.negotiatedFps, context.streamConfig.getBitrate(),
|
||||
context.streamConfig.getRemote(), context.streamConfig.getAudioConfiguration(),
|
||||
context.streamConfig.getHevcSupported(), context.riKey.getEncoded(), ib.array());
|
||||
context.streamConfig.getHevcSupported(), context.riKey.getEncoded(), ib.array(),
|
||||
context.videoCapabilities);
|
||||
}
|
||||
|
||||
public void start(AudioRenderer audioRenderer, VideoDecoderRenderer videoDecoderRenderer, NvConnectionListener connectionListener)
|
||||
{
|
||||
MoonBridge.setupBridge(videoDecoderRenderer, audioRenderer, connectionListener);
|
||||
context.connListener = connectionListener;
|
||||
context.videoCapabilities = videoDecoderRenderer.getCapabilities();
|
||||
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
|
||||
@@ -6,4 +6,6 @@ public abstract class VideoDecoderRenderer {
|
||||
public abstract int submitDecodeUnit(byte[] frameData);
|
||||
|
||||
public abstract void cleanup();
|
||||
|
||||
public abstract int getCapabilities();
|
||||
}
|
||||
|
||||
@@ -127,7 +127,8 @@ public class MoonBridge {
|
||||
int width, int height, int fps,
|
||||
int bitrate, boolean streamingRemotely,
|
||||
int audioConfiguration, boolean supportsHevc,
|
||||
byte[] riAesKey, byte[] riAesIv);
|
||||
byte[] riAesKey, byte[] riAesIv,
|
||||
int videoCapabilities);
|
||||
|
||||
public static native void stopConnection();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user