mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Implement AV1 support
This commit is contained in:
13
src/rtsp.cpp
13
src/rtsp.cpp
@@ -504,6 +504,10 @@ namespace rtsp_stream {
|
||||
ss << "x-nv-video[0].refPicInvalidation=1"sv << std::endl;
|
||||
}
|
||||
|
||||
if (video::active_av1_mode != 1) {
|
||||
ss << "a=rtpmap:98 AV1/90000"sv << std::endl;
|
||||
}
|
||||
|
||||
for (int x = 0; x < audio::MAX_STREAM_CONFIG; ++x) {
|
||||
auto &stream_config = audio::stream_configs[x];
|
||||
std::uint8_t mapping[platf::speaker::MAX_SPEAKERS];
|
||||
@@ -701,13 +705,20 @@ namespace rtsp_stream {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.monitor.videoFormat != 0 && video::active_hevc_mode == 1) {
|
||||
if (config.monitor.videoFormat == 1 && video::active_hevc_mode == 1) {
|
||||
BOOST_LOG(warning) << "HEVC is disabled, yet the client requested HEVC"sv;
|
||||
|
||||
respond(sock, &option, 400, "BAD REQUEST", req->sequenceNumber, {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.monitor.videoFormat == 2 && video::active_av1_mode == 1) {
|
||||
BOOST_LOG(warning) << "AV1 is disabled, yet the client requested AV1"sv;
|
||||
|
||||
respond(sock, &option, 400, "BAD REQUEST", req->sequenceNumber, {});
|
||||
return;
|
||||
}
|
||||
|
||||
auto session = stream::session::alloc(config, launch_session->gcm_key, launch_session->iv);
|
||||
|
||||
auto slot = server->accept(session);
|
||||
|
||||
Reference in New Issue
Block a user