OpenXbox / smartglass-documentation

Documentation of the Xbox One SmartGlass protocol
https://openxbox.github.io/smartglass-documentation
34 stars 8 forks source link

Streaming request format question #2

Closed ozshabat closed 4 years ago

ozshabat commented 5 years ago

Hi,

you guys stated that one of the steps in the stream process is to send a "Gamestream Start Message" like this one:

{
    "type": 1,
    "configuration": {
        "urcpType": "0",
        "urcpFixedRate": "-1",
        "urcpMaximumWindow": "1310720",
        "urcpMinimumRate": "256000",
        "urcpMaximumRate": "10000000",
        "urcpKeepAliveTimeoutMs": "0",
        "audioFecType": "0",
        "videoFecType": "0",
        "videoFecLevel": "3",
        "videoPacketUtilization": "0",
        "enableDynamicBitrate": "false",
        "dynamicBitrateScaleFactor": "1",
        "dynamicBitrateUpdateMs": "5000",
        "sendKeyframesOverTCP": "false",
        "videoMaximumWidth": "1280",
        "videoMaximumHeight": "720",
        "videoMaximumFrameRate": "60",
        "videoPacketDefragTimeoutMs": "16",
        "enableVideoFrameAcks": "false",
        "enableAudioChat": "true",
        "audioBufferLengthHns": "10000000",
        "audioSyncPolicy": "1",
        "audioSyncMinLatency": "10",
        "audioSyncDesiredLatency": "40",
        "audioSyncMaxLatency": "170",
        "audioSyncCompressLatency": "100",
        "audioSyncCompressFactor": "0.99",
        "audioSyncLengthenFactor": "1.01",
        "enableOpusAudio": "false",
        "enableOpusChatAudio": "true",
        "inputReadsPerSecond": "120",
        "udpMaxSendPacketsInWinsock": "250",
        "udpSubBurstGroups": "0",
        "udpBurstDurationMs": "12"
    },
    "reQueryPreviewStatus": false
}

The problem is that until this point I've used a udp socket and not a normal one. In what format should I sent the streaming start message? Should I turn the whole JSON object to a buffer and send it as I did with the other requests? Or should I pack it to a protected payload?

Thanks

tuxuser commented 5 years ago

Hey,

GamestreamStart is a JSON message: JsonMessage, sent to SystemBroadcast channel.

ozshabat commented 5 years ago

I don't know how I missed that. SGString! so easy yet so fabulous!

Thanks buddy