mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-07 00:16:15 +00:00
Reuse buffers for video and audio renderer callbacks to prevent excessive object allocation during stream
This commit is contained in:
@@ -3,7 +3,7 @@ package com.limelight.nvstream.av.video;
|
||||
public abstract class VideoDecoderRenderer {
|
||||
public abstract int setup(int format, int width, int height, int redrawRate);
|
||||
|
||||
public abstract int submitDecodeUnit(byte[] frameData);
|
||||
public abstract int submitDecodeUnit(byte[] frameData, int frameLength);
|
||||
|
||||
public abstract void cleanup();
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@ public class MoonBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public static int bridgeDrSubmitDecodeUnit(byte[] frameData) {
|
||||
public static int bridgeDrSubmitDecodeUnit(byte[] frameData, int frameLength) {
|
||||
if (videoRenderer != null) {
|
||||
return videoRenderer.submitDecodeUnit(frameData);
|
||||
return videoRenderer.submitDecodeUnit(frameData, frameLength);
|
||||
}
|
||||
else {
|
||||
return DR_OK;
|
||||
|
||||
Reference in New Issue
Block a user