Error: 'server' was not declared in this scope server[server_count] = gst_rtsp_server_new();

im using docker container

globally ive declared

static GstRTSPServer* server[MAX_SINK_BINS];

below is the code im using

static gboolean

start_rtsp_streaming(guint rtsp_port_num, guint updsink_port_num,

    NvDsEncoderType enctype, guint64 udp_buffer_size)


    GstRTSPMountPoints* mounts;

    GstRTSPMediaFactory* factory;

    char udpsrc_pipeline[512];

    char port_num_Str[64] = { 0 };

    char* encoder_name;

    if (enctype == NV_DS_ENCODER_H264) {

        encoder_name = "H264";


    else if (enctype == NV_DS_ENCODER_H265) {

        encoder_name = "H265";


    else {

        g_printerr("%s failed", __func__);

        return FALSE;


    if (udp_buffer_size == 0)

        udp_buffer_size = 512 * 1024;


        "( udpsrc name=pay0 port=%d buffer-size=%lu caps=\"application/x-rtp, media=video, "

        "clock-rate=90000, encoding-name=%s, payload=96 \" )",

        updsink_port_num, udp_buffer_size, encoder_name);

    sprintf(port_num_Str, "%d", rtsp_port_num);


    server[server_count] = gst_rtsp_server_new();

    g_object_set(server[server_count], "service", port_num_Str, NULL);

    mounts = gst_rtsp_server_get_mount_points(server[server_count]);

    factory = gst_rtsp_media_factory_new();

    gst_rtsp_media_factory_set_launch(factory, udpsrc_pipeline);

    gst_rtsp_mount_points_add_factory(mounts, "/ds-PoC_Bottle", factory);


    gst_rtsp_server_attach(server[server_count], NULL);




    ("\n *** DeepStream: Launched RTSP Streaming at rtsp://localhost:%d/ds-PoC_Bottle ***\n\n",


    return TRUE;

error: 'server' was not declared in this scope
  server[server_count] = gst_rtsp_server_new();

Hi, This looks like a deepstream issue. We recommend you to raise it to the respective forum.


Hi Nvidia team , any update ?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)