In deepstream-app.h i had add
#include "gstnvdsmeta.h"
#include "nvbufsurface.h"
#include "nvds_obj_encode.h"
.....
struct _AppCtx
{
gboolean version;
gboolean cintr;
gboolean show_bbox_text;
gboolean seeking;
gboolean quit;
gint person_class_id;
gint car_class_id;
gint return_value;
guint index;
gint active_source_index;
GMutex app_lock;
GCond app_cond;
NvDsPipeline pipeline;
NvDsConfig config;
NvDsConfig override_config;
NvDsInstanceData instance_data[MAX_SOURCE_BINS];
NvDsC2DContext *c2d_ctx[MAX_MESSAGE_CONSUMERS];
NvDsAppPerfStructInt perf_struct;
bbox_generated_callback bbox_generated_post_analytics_cb;
bbox_generated_callback all_bbox_generated_cb;
overlay_graphics_callback overlay_graphics_cb;
NvDsFrameLatencyInfo *latency_info;
GMutex latency_lock;
GThread *ota_handler_thread;
guint ota_inotify_fd;
guint ota_watch_desc;
//this is my new add
NvDsObjEncCtxHandle obj_ctx_handle;
};
and in deepstream_app.c i has add some code in create_pipeline(…) function:
gboolean
create_pipeline (AppCtx * appCtx,
bbox_generated_callback bbox_generated_post_analytics_cb,
bbox_generated_callback all_bbox_generated_cb, perf_callback perf_cb,
overlay_graphics_callback overlay_graphics_cb)
{
........
appCtx->all_bbox_generated_cb = all_bbox_generated_cb;
appCtx->bbox_generated_post_analytics_cb = bbox_generated_post_analytics_cb;
appCtx->overlay_graphics_cb = overlay_graphics_cb;
/***here is my obj_ctx_handle***/
NvDsObjEncCtxHandle obj_ctx_handle = nvds_obj_enc_create_context();
if (!obj_ctx_handle)
{
NVGSTDS_ERR_MSG_V("erro");
goto done;
}
appCtx->obj_ctx_handle = obj_ctx_handle;
/**end**/
if (config->osd_config.num_out_buffers < 8) {
config->osd_config.num_out_buffers = 8;
}
pipeline->pipeline = gst_pipeline_new ("pipeline");
if (!pipeline->pipeline) {
NVGSTDS_ERR_MSG_V ("Failed to create pipeline");
goto done;
}......
So i run make in folder deepstream-app and get an error :
deepstream_app.o: In function `create_pipeline':
deepstream_app.c:(.text+0x33d4): undefined reference to `nvds_obj_enc_create_context'
collect2: error: ld returned 1 exit status
Makefile:60: recipe for target 'deepstream-app' failed
make: *** [deepstream-app] Error 1
Everyone can help me