File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,6 +321,22 @@ namespace nvenc {
321321 set_ref_frames (format_config.maxNumRefFramesInDPB , format_config.numRefL0 , 5 );
322322 set_minqp_if_enabled (config.min_qp_hevc );
323323 fill_h264_hevc_vui (format_config.hevcVUIParameters );
324+ if (client_config.enableIntraRefresh == 1 ) {
325+ if (get_encoder_cap (NV_ENC_CAPS_SUPPORT_INTRA_REFRESH )) {
326+ format_config.enableIntraRefresh = 1 ;
327+ format_config.intraRefreshPeriod = 300 ;
328+ format_config.intraRefreshCnt = 299 ;
329+ if (get_encoder_cap (NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH )) {
330+ format_config.singleSliceIntraRefresh = 1 ;
331+ }
332+ else {
333+ BOOST_LOG (warning) << " NvEnc: Single Slice Intra Refresh not supported" ;
334+ }
335+ }
336+ else {
337+ BOOST_LOG (error) << " NvEnc: Client asked for intra-refresh but the encoder does not support intra-refresh" ;
338+ }
339+ }
324340 break ;
325341 }
326342
Original file line number Diff line number Diff line change @@ -976,6 +976,7 @@ namespace rtsp_stream {
976976 args.try_emplace (" x-ml-video.configuredBitrateKbps" sv, " 0" sv);
977977 args.try_emplace (" x-ss-general.encryptionEnabled" sv, " 0" sv);
978978 args.try_emplace (" x-ss-video[0].chromaSamplingType" sv, " 0" sv);
979+ args.try_emplace (" x-ss-video[0].intraRefresh" sv, " 0" sv);
979980
980981 stream::config_t config;
981982
@@ -1012,6 +1013,7 @@ namespace rtsp_stream {
10121013 config.monitor .videoFormat = util::from_view (args.at (" x-nv-vqos[0].bitStreamFormat" sv));
10131014 config.monitor .dynamicRange = util::from_view (args.at (" x-nv-video[0].dynamicRangeMode" sv));
10141015 config.monitor .chromaSamplingType = util::from_view (args.at (" x-ss-video[0].chromaSamplingType" sv));
1016+ config.monitor .enableIntraRefresh = util::from_view (args.at (" x-ss-video[0].intraRefresh" sv));
10151017
10161018 configuredBitrateKbps = util::from_view (args.at (" x-ml-video.configuredBitrateKbps" sv));
10171019 }
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ namespace video {
3838 int dynamicRange;
3939
4040 int chromaSamplingType; // 0 - 4:2:0, 1 - 4:4:4
41+
42+ int enableIntraRefresh; // 0 - disabled, 1 - enabled
4143 };
4244
4345 platf::mem_type_e
You can’t perform that action at this time.
0 commit comments