pause on background instead of disconnecting#66
Conversation
|
idk if you have noticed but the root cause of disconnecting in background is not OpenParsec actively disconnecting from host, but VideoToolBox failed to decode the frame in the background for some reason. And the error code we get from ParsecSDK is -14 (DECODE_ERR_DECODE). Even with this pr I still get this error with the video stream frozen. |
c3593d1 to
d986188
Compare
Yes, -14 is videotoolbox failing to decode on backgrounding the ver you tested wasnt gating the render loop in the pip codepath, so it was still decoding, I paused the gl render loop on background so the sdk don't decode frames while backgrounded Should mention that on longer backgrounds, the connection times out on the sdk side (bg timeout -12007) I have a separate pr for auto reconnect I’ll make pretty soon, otherwise this pr is rebased to current main and -14 videotoolbox is fixed |
|
@hugeBlack Let me know if you need any other revision |
app kills the parsec connection when you switch apps or lock screen , this pr uses ParsecClientPause to pause and resume video/audio streams
some issues would appear where keys remain pressed even after disconnect, this pr would release all pressed keys on background so key presses doesn't get stuck on the host; gl render loop is also paused so it doesnt crash the app on sleep disconnects
pip controller is now only created when the setting is on (builds on #62), I added a toggle in settings for PiP, I also added toggles for status (top bar) and fixed mute to stop host audio streams instead of muting locally