mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Add receive time and frame number to video decoder callbacks
This commit is contained in:
parent
8c09154183
commit
0074848a4e
@ -7,7 +7,7 @@ public abstract class VideoDecoderRenderer {
|
||||
|
||||
public abstract void stop();
|
||||
|
||||
public abstract int submitDecodeUnit(byte[] frameData, int frameLength);
|
||||
public abstract int submitDecodeUnit(byte[] frameData, int frameLength, int frameNumber, long receiveTimeMs);
|
||||
|
||||
public abstract void cleanup();
|
||||
|
||||
|
@ -60,9 +60,9 @@ public class MoonBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public static int bridgeDrSubmitDecodeUnit(byte[] frameData, int frameLength) {
|
||||
public static int bridgeDrSubmitDecodeUnit(byte[] frameData, int frameLength, int frameNumber, long receiveTimeMs) {
|
||||
if (videoRenderer != null) {
|
||||
return videoRenderer.submitDecodeUnit(frameData, frameLength);
|
||||
return videoRenderer.submitDecodeUnit(frameData, frameLength, frameNumber, receiveTimeMs);
|
||||
}
|
||||
else {
|
||||
return DR_OK;
|
||||
|
@ -43,7 +43,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/moonlight-common-c/enet/include \
|
||||
$(LOCAL_PATH)/moonlight-common-c/reedsolomon \
|
||||
$(LOCAL_PATH)/moonlight-common-c/src \
|
||||
|
||||
LOCAL_CFLAGS := -DHAS_SOCKLEN_T=1 -DLC_ANDROID
|
||||
LOCAL_CFLAGS := -DHAS_SOCKLEN_T=1 -DLC_ANDROID -DHAVE_CLOCK_GETTIME=1
|
||||
|
||||
ifeq ($(NDK_DEBUG),1)
|
||||
LOCAL_CFLAGS += -DLC_DEBUG
|
||||
|
@ -79,7 +79,7 @@ Java_com_limelight_nvstream_jni_MoonBridge_init(JNIEnv *env, jobject class) {
|
||||
BridgeDrStartMethod = (*env)->GetStaticMethodID(env, class, "bridgeDrStart", "()V");
|
||||
BridgeDrStopMethod = (*env)->GetStaticMethodID(env, class, "bridgeDrStop", "()V");
|
||||
BridgeDrCleanupMethod = (*env)->GetStaticMethodID(env, class, "bridgeDrCleanup", "()V");
|
||||
BridgeDrSubmitDecodeUnitMethod = (*env)->GetStaticMethodID(env, class, "bridgeDrSubmitDecodeUnit", "([BI)I");
|
||||
BridgeDrSubmitDecodeUnitMethod = (*env)->GetStaticMethodID(env, class, "bridgeDrSubmitDecodeUnit", "([BIIJ)I");
|
||||
BridgeArInitMethod = (*env)->GetStaticMethodID(env, class, "bridgeArInit", "(I)I");
|
||||
BridgeArStartMethod = (*env)->GetStaticMethodID(env, class, "bridgeArStart", "()V");
|
||||
BridgeArStopMethod = (*env)->GetStaticMethodID(env, class, "bridgeArStop", "()V");
|
||||
@ -173,7 +173,9 @@ int BridgeDrSubmitDecodeUnit(PDECODE_UNIT decodeUnit) {
|
||||
currentEntry = currentEntry->next;
|
||||
}
|
||||
|
||||
return (*env)->CallStaticIntMethod(env, GlobalBridgeClass, BridgeDrSubmitDecodeUnitMethod, DecodedFrameBuffer, decodeUnit->fullLength);
|
||||
return (*env)->CallStaticIntMethod(env, GlobalBridgeClass, BridgeDrSubmitDecodeUnitMethod,
|
||||
DecodedFrameBuffer, decodeUnit->fullLength, decodeUnit->frameNumber,
|
||||
decodeUnit->receiveTimeMs);
|
||||
}
|
||||
|
||||
int BridgeArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c01deff683d9192a71f851815dbea4bba14e4f04
|
||||
Subproject commit 99cfae7accd4e961806c5f5edc987f5f92a1ba29
|
Loading…
x
Reference in New Issue
Block a user