mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-02 15:56:02 +00:00
Add ML_ERROR_FRAME_CONVERSION error constant
This commit is contained in:
parent
bfade1d795
commit
502f799a73
@ -833,8 +833,15 @@ static void controlReceiveThreadFunc(void* context) {
|
|||||||
|
|
||||||
Limelog("Server notified termination reason: 0x%08x\n", terminationErrorCode);
|
Limelog("Server notified termination reason: 0x%08x\n", terminationErrorCode);
|
||||||
|
|
||||||
// NVST_DISCONN_SERVER_TERMINATED_CLOSED is the expected graceful termination error
|
// Normalize the termination error codes for specific values we recognize
|
||||||
if (terminationErrorCode == 0x80030023) {
|
switch (terminationErrorCode) {
|
||||||
|
case 0x800e9403: // NVST_DISCONN_SERVER_VIDEO_ENCODER_CONVERT_INPUT_FRAME_FAILED
|
||||||
|
terminationErrorCode = ML_ERROR_FRAME_CONVERSION;
|
||||||
|
break;
|
||||||
|
case 0x800e9302: // NVST_DISCONN_SERVER_VFP_PROTECTED_CONTENT
|
||||||
|
terminationErrorCode = ML_ERROR_PROTECTED_CONTENT;
|
||||||
|
break;
|
||||||
|
case 0x80030023: // NVST_DISCONN_SERVER_TERMINATED_CLOSED
|
||||||
if (lastSeenFrame != 0) {
|
if (lastSeenFrame != 0) {
|
||||||
// Pass error code 0 to notify the client that this was not an error
|
// Pass error code 0 to notify the client that this was not an error
|
||||||
terminationErrorCode = ML_ERROR_GRACEFUL_TERMINATION;
|
terminationErrorCode = ML_ERROR_GRACEFUL_TERMINATION;
|
||||||
@ -844,10 +851,9 @@ static void controlReceiveThreadFunc(void* context) {
|
|||||||
// NvStreamer to terminate prior to sending any frames.
|
// NvStreamer to terminate prior to sending any frames.
|
||||||
terminationErrorCode = ML_ERROR_UNEXPECTED_EARLY_TERMINATION;
|
terminationErrorCode = ML_ERROR_UNEXPECTED_EARLY_TERMINATION;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
// NVST_DISCONN_SERVER_VFP_PROTECTED_CONTENT means it failed due to protected content on screen
|
default:
|
||||||
else if (terminationErrorCode == 0x800e9302) {
|
break;
|
||||||
terminationErrorCode = ML_ERROR_PROTECTED_CONTENT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -407,6 +407,12 @@ typedef void(*ConnListenerConnectionTerminated)(int errorCode);
|
|||||||
// due to a protected content error from the host. This value is supported on GFE 3.22+.
|
// due to a protected content error from the host. This value is supported on GFE 3.22+.
|
||||||
#define ML_ERROR_PROTECTED_CONTENT -103
|
#define ML_ERROR_PROTECTED_CONTENT -103
|
||||||
|
|
||||||
|
// This error is passed to ConnListenerConnectionTerminated() if the stream ends
|
||||||
|
// due a frame conversion error. This is most commonly due to an incompatible
|
||||||
|
// desktop resolution and streaming resolution with HDR enabled. This value is
|
||||||
|
// supported on GFE 3.22+.
|
||||||
|
#define ML_ERROR_FRAME_CONVERSION -104
|
||||||
|
|
||||||
// This callback is invoked to log debug message
|
// This callback is invoked to log debug message
|
||||||
typedef void(*ConnListenerLogMessage)(const char* format, ...);
|
typedef void(*ConnListenerLogMessage)(const char* format, ...);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user