Okay, nvds_obj_enc_process (ctx, &frameData, ip_surf, NULL, frame_meta); This function save the image as jpg right? Without saving to disk how can I send the image to kafka?
NvDsObjEncUsrArgs 's attachUsrMeta can save jpg data as usermeta, please refer to sample \opt\nvidia\deepstream\deepstream-6.2\sources\apps\sample_apps\deepstream-image-meta-test\deepstream_image_meta_test.c, it can save and access jpg data in usermeta. then you can use this method add custom data to send.
please create NvDsObjEncCtxHandle by nvds_obj_enc_create_context and pass it to probe function by gst_pad_add_probe (pgie_src_pad, GST_PAD_PROBE_TYPE_BUFFER,
pgie_src_pad_buffer_probe, (gpointer) obj_ctx_handle, NULL);
this function is saving a lot of images to the disk. probably 60/s. I don’t want it to save on disk, instead send to kafka. looks like there is no way to get the image data before nvds_obj_enc_process(ctx, &objData, ip_surf, obj_meta, frame_meta); this function.