[BUG] Stream remove wrong response

Hardware Platform: GPU
Deepstream: 7.1
Docker Image: 7.1-triton-multiarch
GPU Type: A4000

When I try to remove non existing stream, 200 code returns.

Active sources : 0

curl -XPOST 'http://localhost:9000/api/v1/stream/remove' -d '{
  "key": "sensor",
  "value": {
      "camera_id": "uniqueSensorID1",
      "camera_name": "front_door",
      "camera_url": "file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4",
      "change": "camera_remove",
      "metadata": {
          "resolution": "1920 x1080",
          "codec": "h264",
          "framerate": 30
      }
  },
  "headers": {
      "source": "vst",
      "created_at": "2021-06-01T14:34:13.417Z"
  }
}'
{
	"reason" : "",
	"status" : "HTTP/1.1 200 OK"
}

are you testing deepstream-server? the related code are opensource. you can modify to customize.

  1. if within_multiurisrcbin is set 0. please add the following code in s_stream_callback_impl of rest_server_callbacks.cpp, which is in the same directory.
        g_print ("No record found; Failed to remove sensor id=[%s] uri=[%s]\n",
                    stream_info->value_camera_id.c_str (),
            stream_info->value_camera_url.c_str ());
          //below is new code
          stream_info->status = STREAM_REMOVE_FAIL;
          stream_info->stream_log = "STREAM_REMOVE_FAIL, No record found";
          stream_info->err_info.code = StatusNotAcceptable;

then rebuild deepstream-server-app.
2. if within_multiurisrcbin is set 1, please add the code above in s_stream_api_impl of opt\nvidia\deepstream\deepstream\sources\gst-plugins\gst-nvmultiurisrcbin\gstdsnvmultiurisrcbin.cpp. then rebuild libnvdsgst_nvmultiurisrcbin.so, then replace /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_nvmultiurisrcbin.so with the new so.

here is my test.

1 Like

if within_multiurisrcbin is set to 1 in configuration file. please refer to the method 2 in my last commnet.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.