Add support for audio stream encryption

Clients must opt-in using the new encryptionFlags field
This commit is contained in:
Cameron Gutman
2021-04-22 00:20:17 -05:00
parent 55cf1f8d30
commit db81f1e512
6 changed files with 71 additions and 4 deletions

View File

@@ -29,6 +29,11 @@ extern "C" {
#define COLOR_RANGE_LIMITED 0
#define COLOR_RANGE_FULL 1
// Values for 'encryptionFlags' field below
#define ENCFLG_NONE 0x00000000
#define ENCFLG_AUDIO 0x00000001
#define ENCFLG_ALL 0xFFFFFFFF
typedef struct _STREAM_CONFIGURATION {
// Dimensions in pixels of the desired video stream
int width;
@@ -87,6 +92,14 @@ typedef struct _STREAM_CONFIGURATION {
// option (listed above). If not set, the encoder will default to Limited.
int colorRange;
// Specifies the data streams where encryption may be enabled if supported
// by the host PC. Ideally, you would pass ENCFLG_ALL to encrypt everything
// that we support encrypting. However, lower performance hardware may not
// be able to support encrypting heavy stuff like video or audio data, so
// that encryption may be disabled here. Remote input encryption is always
// enabled.
int encryptionFlags;
// AES encryption data for the remote input stream. This must be
// the same as what was passed as rikey and rikeyid
// in /launch and /resume requests.