@@ -815,6 +815,14 @@ namespace rtsp_stream {
815815 ss << " a=rtpmap:98 AV1/90000" sv << std::endl;
816816 }
817817
818+ if (video::active_mpeg2_mode >= 2 ) {
819+ ss << " a=rtpmap:98 MPV/90000" sv << std::endl;
820+ }
821+
822+ if (video::active_h263p_mode == 2 ) {
823+ ss << " a=rtpmap:98 H263-1998/90000" sv << std::endl;
824+ }
825+
818826 if (!session.surround_params .empty ()) {
819827 // If we have our own surround parameters, advertise them twice first
820828 ss << " a=fmtp:97 surround-params=" sv << session.surround_params << std::endl;
@@ -1115,20 +1123,34 @@ namespace rtsp_stream {
11151123 config.monitor .bitrate = (int ) configuredBitrateKbps;
11161124 }
11171125
1118- if (config.monitor .videoFormat == 1 && video::active_hevc_mode == 1 ) {
1126+ if (config.monitor .videoFormat == video::format_hevc && video::active_hevc_mode == 1 ) {
11191127 BOOST_LOG (warning) << " HEVC is disabled, yet the client requested HEVC" sv;
11201128
11211129 respond (sock, session, &option, 400 , " BAD REQUEST" , req->sequenceNumber , {});
11221130 return ;
11231131 }
11241132
1125- if (config.monitor .videoFormat == 2 && video::active_av1_mode == 1 ) {
1133+ if (config.monitor .videoFormat == video::format_av1 && video::active_av1_mode == 1 ) {
11261134 BOOST_LOG (warning) << " AV1 is disabled, yet the client requested AV1" sv;
11271135
11281136 respond (sock, session, &option, 400 , " BAD REQUEST" , req->sequenceNumber , {});
11291137 return ;
11301138 }
11311139
1140+ if (config.monitor .videoFormat == video::format_mpeg2 && video::active_mpeg2_mode < 2 ) {
1141+ BOOST_LOG (warning) << " MPEG-2 is disabled, yet the client requested MPEG-2" sv;
1142+
1143+ respond (sock, session, &option, 400 , " BAD REQUEST" , req->sequenceNumber , {});
1144+ return ;
1145+ }
1146+
1147+ if (config.monitor .videoFormat == video::format_h263p && video::active_h263p_mode != 2 ) {
1148+ BOOST_LOG (warning) << " H.263+ is disabled, yet the client requested H.263+" sv;
1149+
1150+ respond (sock, session, &option, 400 , " BAD REQUEST" , req->sequenceNumber , {});
1151+ return ;
1152+ }
1153+
11321154 // Check that any required encryption is enabled
11331155 auto encryption_mode = net::encryption_mode_for_address (sock.remote_endpoint ().address ());
11341156 if (encryption_mode == config::ENCRYPTION_MODE_MANDATORY &&
0 commit comments