-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What I should do in the my app to proper closing stream? #880
Comments
Yeah, it's a limitation or design decision of GeForce Experience when streaming manually added games. It doesn't track the game you're streaming to determine if it closes. As a workaround, you can use the option in Moonlight called "Quit app on host PC after ending stream". That will automatically send the quit command when you stop streaming using the Ctrl+Alt+Shift+Q or Start+Select+L1+R1 key combos. |
Can I do the same but from app side? |
If I am not mistaken, this would also cause the application to quit on the stream host in case of an unexpected freeze/interruption/connection drop of the stream? BTW (I don't mean to hijack the thread) I have been experiencing this freezing behavior lately. Not sure if it is a known issue. Back on topic @dukobpa3 I have created some wrapper Batch scripts for Windows. In essence, I wrap the desired process (some_game.exe) and periodically pool / monitor if this process is still active. If it no loner exists, I trigger the kill command for the NVidia streaming process on the host machine. In turn the stream client (moonlight-qt) than knows there was an actual connection termination. This has an added benefit that it works around game launch issues for some games. In particular if a game first displays a banner / splash-screen, and than restarts the .exe process to actually launch the game. I can share the scripts here if you would like. From what I've seen my .bat files have a minimal impact on host CPU usage, and I would gladly let the community improve them :) |
@kurac338 I found the same solution already and using it for now. |
No, we only quit if the disconnection was intentional. If it was unexpected (due to network error or something), we don't send the quit command. Freezing issues are most likely caused by moonlight-stream/nvidia-gamestream-issues#27 |
Main question still relevant ))) How can I say from my app to stream that it closing? Now I'm doing it a bit dirty, but it works $args = [System.Environment]::GetCommandLineArgs()
if($args.Contains('--gsexit')) {
Get-Process -Name "nvstreamer" | Stop-Process
} This solution have two cons: Can I maybe close |
Finally got it Bit hacking solution but works for me. Something like described here
<Fingerprint name='your_app'>
<DisplayName>Your App</DisplayName>
<Version name='generic'>
<CMSID>500000001</CMSID> <!-- Any unique ID. I set just with the same length as others -->
<CMSVersion>1</CMSVersion>
<Distributor>Standalone</Distributor>
<Icon>Your.App.exe</Icon> <!-- I don't know how proper set icons and images, for now it is without cover in GS clients -->
<Image>Your.App.exe</Image>
<Launch>Your.App.exe</Launch>
<IsAutomatable>0</IsAutomatable> <!-- If 1 t–en will be available on GFE App on desktop as supported but for real support it needs some lua wrapper, I can't decompile it properly for now so don't know how to make my own -->
<IsStreamingSupported>1</IsStreamingSupported> <!-- important for being available in GS client -->
<StreamingAutomatedLaunch>1</StreamingAutomatedLaunch>
<StreamingCmdLine>Your.App.exe</StreamingCmdLine>
<StreamingCaption>Your App</StreamingCaption>
<StreamingClassName>Your App</StreamingClassName>
<Files>
<File name='Your.App.exe' />
</Files>
</Version>
</Fingerprint> Something like that. Next I'll fix issue with Icons and Covers. |
Is your feature request related to a problem? Please describe.
Some apps not proper recognising when closed so I need to close stream manually.
Describe the solution you'd like
In case this app is my own – how I can proper close it with closing stream also if opened?
Describe alternatives you've considered
I can close streaming process manually from app on exit, but in this case Stream closes in some kind of exception like "Stream interrupted". I think there should be more intelligent way to do it more clear?
(It is not actually feature request but hadn't other options :) Thanks! )
The text was updated successfully, but these errors were encountered: