Allow localAudioPlayMode to change on /resume
Newer clients send all /launch parameters to /resume too
This commit is contained in:
parent
66989a4690
commit
4ae412b219
1 changed files with 12 additions and 5 deletions
|
|
@ -823,11 +823,11 @@ namespace nvhttp {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Probe encoders again before streaming to ensure our chosen
|
|
||||||
// encoder matches the active GPU (which could have changed
|
|
||||||
// due to hotplugging, driver crash, primary monitor change,
|
|
||||||
// or any number of other factors).
|
|
||||||
if (rtsp_stream::session_count() == 0) {
|
if (rtsp_stream::session_count() == 0) {
|
||||||
|
// Probe encoders again before streaming to ensure our chosen
|
||||||
|
// encoder matches the active GPU (which could have changed
|
||||||
|
// due to hotplugging, driver crash, primary monitor change,
|
||||||
|
// or any number of other factors).
|
||||||
if (video::probe_encoders()) {
|
if (video::probe_encoders()) {
|
||||||
tree.put("root.resume", 0);
|
tree.put("root.resume", 0);
|
||||||
tree.put("root.<xmlattr>.status_code", 503);
|
tree.put("root.<xmlattr>.status_code", 503);
|
||||||
|
|
@ -835,6 +835,13 @@ namespace nvhttp {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Newer Moonlight clients send localAudioPlayMode on /resume too,
|
||||||
|
// so we should use it if it's present in the args and there are
|
||||||
|
// no active sessions we could be interfering with.
|
||||||
|
if (args.find("localAudioPlayMode"s) != std::end(args)) {
|
||||||
|
host_audio = util::from_view(get_arg(args, "localAudioPlayMode"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtsp_stream::launch_session_raise(make_launch_session(host_audio, args));
|
rtsp_stream::launch_session_raise(make_launch_session(host_audio, args));
|
||||||
|
|
@ -922,7 +929,7 @@ namespace nvhttp {
|
||||||
|
|
||||||
auto add_cert = std::make_shared<safe::queue_t<crypto::x509_t>>(30);
|
auto add_cert = std::make_shared<safe::queue_t<crypto::x509_t>>(30);
|
||||||
|
|
||||||
// /resume doesn't get the parameter "localAudioPlayMode"
|
// /resume doesn't always get the parameter "localAudioPlayMode"
|
||||||
// /launch will store it in host_audio
|
// /launch will store it in host_audio
|
||||||
bool host_audio {};
|
bool host_audio {};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue