Draw perpendicular lines in deepstream-app files

I want to edit deepstream_app_main.c file to draw two perpendicular lines in the middle of the display.
How to do that in the code?

**• Hardware Platform: Jetson Nano
**• DeepStream Version: 6.0
**• JetPack Version: 4.6.1

The gst-nvdsanalytics plugin is open source now. You can refer to the source code to draw lines.

static void
attach_framemeta_analytics_metadata (GstNvDsAnalytics * nvdsanalytics,
    NvDsFrameMeta * frame_meta, NvDsAnalyticProcessParams & process_params,
    gint stream_id)

Should I edit the file of the nvdsanalytics plugin or add it to my code?

if I have to add it, where would I add it into my code? (I am editing deepstream_app.c)

You need to refer to that code in gst-nvdsanalytics plugin and add it to the osd probe function.

static GstPadProbeReturn
gie_processing_done_buf_prob (GstPad * pad, GstPadProbeInfo * info,
    gpointer u_data)

Do you have an example in the code for that?

I have this in the deepstream_app.c file:

static GstPadProbeReturn
gie_processing_done_buf_prob (GstPad * pad, GstPadProbeInfo * info,
    gpointer u_data)
  GstBuffer *buf = (GstBuffer *) info->data;
  NvDsInstanceBin *bin = (NvDsInstanceBin *) u_data;
  guint index = bin->index;
  AppCtx *appCtx = bin->appCtx;

  if (gst_buffer_is_writable (buf))
    process_buffer (buf, appCtx, index);
  return GST_PAD_PROBE_OK;

What should I edit to draw a line on each frame?

About how to draw a line, please refer to the code I attached before.

This part is already open source on our latest version 6.3.

I am using deepstream 6.0.
Not 6.3.

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

I mean you can get our DeepStream 6.3 source code beacause this part on deepstream 6.3 is open source.
You can refer to the open source and port the code to yours.

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