Implement AV1 support

This commit is contained in:
Cameron Gutman
2023-08-13 15:51:48 -05:00
parent 67c1fa6da7
commit 69e720b44b
10 changed files with 389 additions and 44 deletions

View File

@@ -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);