mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-01 15:25:43 +00:00
Add new RTSP encryption flags
This commit is contained in:
parent
15b55a441b
commit
b6bbb4fb26
@ -33,6 +33,9 @@ SS_PING AudioPingPayload;
|
|||||||
SS_PING VideoPingPayload;
|
SS_PING VideoPingPayload;
|
||||||
uint32_t ControlConnectData;
|
uint32_t ControlConnectData;
|
||||||
uint32_t SunshineFeatureFlags;
|
uint32_t SunshineFeatureFlags;
|
||||||
|
uint32_t EncryptionFeaturesSupported;
|
||||||
|
uint32_t EncryptionFeaturesRequested;
|
||||||
|
uint32_t EncryptionFeaturesEnabled;
|
||||||
|
|
||||||
// Connection stages
|
// Connection stages
|
||||||
static const char* stageNames[STAGE_MAX] = {
|
static const char* stageNames[STAGE_MAX] = {
|
||||||
|
@ -44,6 +44,14 @@ extern uint32_t ControlConnectData;
|
|||||||
|
|
||||||
extern uint32_t SunshineFeatureFlags;
|
extern uint32_t SunshineFeatureFlags;
|
||||||
|
|
||||||
|
// Encryption flags shared by Sunshine and Moonlight in RTSP
|
||||||
|
#define SS_ENC_CONTROL_V2 0x01
|
||||||
|
#define SS_ENC_VIDEO 0x02
|
||||||
|
|
||||||
|
extern uint32_t EncryptionFeaturesSupported;
|
||||||
|
extern uint32_t EncryptionFeaturesRequested;
|
||||||
|
extern uint32_t EncryptionFeaturesEnabled;
|
||||||
|
|
||||||
// ENet channel ID values
|
// ENet channel ID values
|
||||||
#define CTRL_CHANNEL_GENERIC 0x00
|
#define CTRL_CHANNEL_GENERIC 0x00
|
||||||
#define CTRL_CHANNEL_URGENT 0x01 // IDR and reference frame invalidation requests
|
#define CTRL_CHANNEL_URGENT 0x01 // IDR and reference frame invalidation requests
|
||||||
|
@ -942,6 +942,15 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) {
|
|||||||
SunshineFeatureFlags = 0;
|
SunshineFeatureFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look for the Sunshine encryption flags in the SDP attributes
|
||||||
|
if (!parseSdpAttributeToUInt(response.payload, "x-ss-general.encryptionSupported", &EncryptionFeaturesSupported)) {
|
||||||
|
EncryptionFeaturesSupported = 0;
|
||||||
|
}
|
||||||
|
if (!parseSdpAttributeToUInt(response.payload, "x-ss-general.encryptionRequested", &EncryptionFeaturesRequested)) {
|
||||||
|
EncryptionFeaturesRequested = 0;
|
||||||
|
}
|
||||||
|
EncryptionFeaturesEnabled = 0;
|
||||||
|
|
||||||
// Parse the Opus surround parameters out of the RTSP DESCRIBE response.
|
// Parse the Opus surround parameters out of the RTSP DESCRIBE response.
|
||||||
ret = parseOpusConfigurations(&response);
|
ret = parseOpusConfigurations(&response);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user