Sample deepstream_server not using gstnvcustomhelper

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson
• DeepStream Version
6.3
• JetPack Version (valid for Jetson only)
5.1.3
• Issue Type( questions, new requirements, bugs)
question

Hello,

I am using deepstream-app to make an application with variable quality.

In the config file (deepstream_config.txt), the source is defined like this :

[source-list]
num-source-bins = 1
list = rtsp://admin:xxx@10.1.2.70:554/live
use-nvmultiurisrcbin = 1
sensor-id-list = 2
max-batch-size = 4
http-ip = localhost
http-port = 9000

[source-attr-all]
enable = 1
type = 4
num-sources = 1
gpu-id = 0
cudadec-memtype = 0
latency = 100
rtsp-reconnect-interval-sec = 10
rtsp-reconnect-attempts = -1
drop-frame-interval = 5

I am using the gstnvcustomhelper events to trigger modifications.
I want to modify both bitrate and drop-frame-interval.

I can successfully modify the bitrate using these lines :

GstEvent* nvevent = gst_nvevent_enc_bitrate_update(g_strdup_printf("%i", stream_id), bitrate);
push_nv_event(appCtx, nvevent, "nv-enc-bitrate-update");

But the same logic is not working for the drop-frame-interval using :

GstEvent* nvevent = gst_nvevent_dec_drop_frame_interval_update(g_strdup_printf("%i", stream_id), drop_frame);
push_nv_event(appCtx, nvevent, "nv-dec-drop-frame-interval-update");


By investigating the source codes, I can see in /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-server/rest_server_callbacks.cpp file that the bitrate is modified in the function s_enc_callback_impl using (line 152) :

nvevent =
            gst_nvevent_enc_bitrate_update ((char *) enc_info->stream_id.
            c_str (), enc_info->bitrate);

But the drop-frame-interval is modified in the function s_dec_callback_impl using (line 348):

set_nvuribin_dec_prop (serverappctx->nvmultiurisrcbinCreator, sourceId,
          dec_info)

The observation is : The sample deepstream-server is not using the same logic for updating the bitrate and the drop-frame-interval.

Is it possible to use the gst_nvevent_... to modify the drop-frame-interval value ?
Why is it not used in the sample ?

Thanks in advance,
Henri

Thanks for the sharing! can you reproduce this issue on the latest DS7.1? if not, you can compare the code logics.