vdi-stream-client icon indicating copy to clipboard operation
vdi-stream-client copied to clipboard

Resolution Sync: Client-to-Host

Open nomi-san opened this issue 1 year ago • 0 comments

My host event loop:

  case HOST_EVENT_USER_DATA: {
    char *data = ParsecGetBuffer(parsec, event.userData.key);
    printf("udata id: %d, data: %s\n", event.userData.id, data);
    ParsecFree(parsec, data);
    break;

To change the host's screen resolution directly in client, Parsec send this message:

udata id: 11, data:
{
  "video": [
    {
      "output": "none",
      "encoderMaxBitrate": 10,
      "encoderFPS": 0,     // 0 to keep the host settings
      "resolutionX": 1920, // expected value
      "resolutionY": 1080,
      "fullFPS": false,    // true to tell the host records upto FPS limit
      "hostOS": 0
    },
    {
      // same as previous, but resolutionX and Y are 0
    },
    {
      // same as previous
    }
  ]
}

Seems Parsec supports upto 3 video streams, but only 2 (NUM_VSTREAMS) in SDK.

Moreover, I found two empty udata every a few long secs:

udata id: 9, data: 
udata id: 10, data: 

And we've already known 7 (PARSEC_APP_CLIPBOARD_MSG) is used to transfer clipboard data 😄


nomi-san avatar Aug 17 '22 14:08 nomi-san