mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Add special termination error code for protected content
This commit is contained in:
parent
9841a6e34d
commit
6dca9c6754
@ -817,7 +817,7 @@ static void controlReceiveThreadFunc(void* context) {
|
|||||||
|
|
||||||
Limelog("Server notified termination reason: 0x%08x\n", terminationErrorCode);
|
Limelog("Server notified termination reason: 0x%08x\n", terminationErrorCode);
|
||||||
|
|
||||||
// Handle NVST_DISCONN_SERVER_TERMINATED_CLOSED specially
|
// NVST_DISCONN_SERVER_TERMINATED_CLOSED is the expected graceful termination error
|
||||||
if (terminationErrorCode == 0x80030023) {
|
if (terminationErrorCode == 0x80030023) {
|
||||||
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
|
||||||
@ -829,6 +829,10 @@ static void controlReceiveThreadFunc(void* context) {
|
|||||||
terminationErrorCode = ML_ERROR_UNEXPECTED_EARLY_TERMINATION;
|
terminationErrorCode = ML_ERROR_UNEXPECTED_EARLY_TERMINATION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// NVST_DISCONN_SERVER_VFP_PROTECTED_CONTENT means it failed due to protected content on screen
|
||||||
|
else if (terminationErrorCode == 0x800e9302) {
|
||||||
|
terminationErrorCode = ML_ERROR_PROTECTED_CONTENT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uint16_t terminationReason;
|
uint16_t terminationReason;
|
||||||
|
@ -377,10 +377,14 @@ typedef void(*ConnListenerConnectionTerminated)(int errorCode);
|
|||||||
|
|
||||||
// This error is passed to ConnListenerConnectionTerminated() if the stream ends
|
// This error is passed to ConnListenerConnectionTerminated() if the stream ends
|
||||||
// very soon after starting due to a graceful termination from the host. Usually
|
// very soon after starting due to a graceful termination from the host. Usually
|
||||||
// this seems to happen if DRM protected content is on-screen, or another issue
|
// this seems to happen if DRM protected content is on-screen (pre-GFE 3.22), or
|
||||||
// that prevents the encoder from being able to capture video successfully.
|
// another issue that prevents the encoder from being able to capture video successfully.
|
||||||
#define ML_ERROR_UNEXPECTED_EARLY_TERMINATION -102
|
#define ML_ERROR_UNEXPECTED_EARLY_TERMINATION -102
|
||||||
|
|
||||||
|
// This error is passed to ConnListenerConnectionTerminated() if the stream ends
|
||||||
|
// due to a protected content error from the host. This value is supported on GFE 3.22+.
|
||||||
|
#define ML_ERROR_PROTECTED_CONTENT -103
|
||||||
|
|
||||||
// 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