mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +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);
|
||||
|
||||
// Handle NVST_DISCONN_SERVER_TERMINATED_CLOSED specially
|
||||
// NVST_DISCONN_SERVER_TERMINATED_CLOSED is the expected graceful termination error
|
||||
if (terminationErrorCode == 0x80030023) {
|
||||
if (lastSeenFrame != 0) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
// 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 {
|
||||
uint16_t terminationReason;
|
||||
|
@ -377,10 +377,14 @@ typedef void(*ConnListenerConnectionTerminated)(int errorCode);
|
||||
|
||||
// This error is passed to ConnListenerConnectionTerminated() if the stream ends
|
||||
// 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
|
||||
// that prevents the encoder from being able to capture video successfully.
|
||||
// this seems to happen if DRM protected content is on-screen (pre-GFE 3.22), or
|
||||
// another issue that prevents the encoder from being able to capture video successfully.
|
||||
#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
|
||||
typedef void(*ConnListenerLogMessage)(const char* format, ...);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user